Commit Graph

1501 Commits

Author SHA1 Message Date
Tomas Janousek
b9ce5b034b Fix obscuring notifications when moving floats
Since 4565e2c90e, not only do we raise the floating window to top when
starting dragging, we also restack all other managed windows directly
below it (mouse{Move,Resize}Window now call `float` while dragging,
which invoke `windows` and that restacks all windows). This means that
as soon as we start dragging, all xmonad-managed windows are raised to
the top, obscuring any unmanaged (override-redirect) windows that were
at the top before.

The good thing about 4565e2c90e is that since we refloat and refresh
on every mouse move while dragging, we no longer need the `raiseWindow`.
It was probably only there so that it stays visible when dragging
between Xinerama screens (3cb64d7461), and that's taken care of by
refloating the window on every move. As the refresh restacks everything
anyway, the only function of the `raiseWindow` is to stack windows above
unmanaged ones, which is likely undesirable.

There is still one known issue related to obscuring notifications:
https://github.com/xmonad/xmonad/issues/89
That one is caused by X opening new windows at the top of stacking order
and xmonad then restacking all other windows directly beneath them if
the new window is in the master position of the stack. Some notification
daemons like dunst work around this by raising themselves whenever a new
window is opened
(77bfbc4f7f/src/x11/x.c (L348)).
Fixing this one is considerably more complicated as we'd need to keep
track of (unmanaged) windows that wish to be stacked above new windows,
therefore this won't be addressed here, and probably won't be addressed
in xmonad core ever.

Fixes: https://github.com/xmonad/xmonad/issues/208
Fixes: 4565e2c90e ("fix #63: window jumping to origin position when dragging")
2021-02-16 12:00:28 +00:00
Tomáš Janoušek
a90558c07e Merge pull request #223 from wygulmage/cleanup-tests
deleted unused 'mul' definition in 'prop_aspect_fits'.
2021-01-26 01:15:01 +01:00
Sibi Prabakaran
56b0f850bc Merge pull request #200 from wygulmage/strict-rectangle
Make ScreenDetail a newtype and RationalRect strict in its contents
2021-01-23 19:46:15 +05:30
Peter Simons
51a179dc68 Merge pull request #267 from xmonad/revert-266-reenable-lts
Revert "Re-enable lts based testing"
2021-01-20 12:48:44 +01:00
Peter Simons
8a8d5f71b1 Revert "Re-enable lts based testing" 2021-01-20 12:48:13 +01:00
Tomáš Janoušek
4b69a456cc Merge pull request #266 from xmonad/reenable-lts
Re-enable lts based testing
2021-01-20 12:27:53 +01:00
Sibi Prabakaran
e12d0be1b2 Re-enable lts based testing 2021-01-20 16:20:58 +05:30
Peter Simons
002326ceb1 Merge pull request #265 from xmonad/t/haskell-ci
Generate CI with the haskell-ci utility.
2021-01-19 20:58:01 +01:00
Peter Simons
758e3d85e6 Generate CI with the haskell-ci utility. 2021-01-19 20:48:16 +01:00
Keith
f5bd77a7f8 made ScreenDetail a newtype and RationalRect strict in its contents. 2021-01-19 12:06:07 -05:00
Tomáš Janoušek
519c79a57e Merge pull request #263 from slotThe/exception-extensible
Control.Exception.Extensible -> Control.Exception
2021-01-17 20:39:00 +01:00
slotThe
0aa40480f9 Control.Exception.Extensible -> Control.Exception
According to its documentation[1], this module simply re-exports
Control.Exception on recent GHC versions.  As we only support recent
versions, this import is unnecessary.

[1] http://hackage.haskell.org/package/extensible-exceptions-0.1.1.4/docs/Control-Exception-Extensible.html
2021-01-12 11:57:34 +01:00
Peter Simons
36dd6afb49 Merge pull request #261 from xmonad/t/switch-stack-builds-to-nightly
stack.yaml: switch from Stackage LTS to Nightly
2021-01-10 19:36:12 +01:00
Peter Simons
3015968ee4 Run CI builds with Stackage Nightly.
Unfortunately, our CI builds have a hard-coded assumption that all kinds of
LTS-X builds can be performed with the same stack.yaml file, which is not true.
We need to use specialized build instructions for each version of the
environment we're building in, e.g. stack-lts-16.yaml, stack-nightly.yaml, and
so on. Making that change is not super hard, but it's not completely trivial
either because the hooks use a hash of the stack file to determine whether the
cash is still valid, etc., and I'm not entirely sure about the best way to
adapt that code to support multiple YAML files.

For the time being, the most important build IMHO is Stackage Nightly,
because (a) we really want to support the nightly snapshot since (b) it can
compile the genmanpage executable relatively easily.
2021-01-09 19:46:50 +01:00
Peter Simons
5bb6c88b41 stack.yaml: switch from Stackage LTS to Nightly
Let's use a moderately recent compiler like ghc-8.10.3
instead of the old 8.8.x branch for development. Same goes
for our dependencies; development should take place with
recent versions of our dependencies.
2021-01-09 18:06:17 +01:00
Tomáš Janoušek
f875a56620 Merge pull request #258 from slotThe/xdg-things
Revise XDG handling
2021-01-07 19:52:51 +01:00
slotThe
70a75e5e3f Update documentation 2021-01-07 17:25:30 +01:00
slotThe
735fb58f6c Revise XDG handling
Improve handling of the whole XDG situation.  This now looks as follows

  1. If all three of xmonad's environment variables (XMONAD_DATA_DIR,
     XMONAD_CONFIG_DIR, and XMONAD_CACHE_DIR) are set, use them.
  2. If there is a build script `build' or configuration `xmonad.hs' in
     `~/.xmonad', set all three directories to `~/.xmonad'.
  3. Otherwise, use XDG_DATA_HOME, XDG_CONFIG_HOME, and
     XDG_CACHE_HOME (or their respective fallbacks).

If none of the above exist, we default to using the XDG_* variables,
creating the necessary directories if needed.
2021-01-07 15:32:02 +01:00
Tomas Janousek
e8f48b77f9 Sync MAINTAINERS.md with reality on GitHub 2021-01-03 14:05:32 +01:00
Sibi Prabakaran
e363c44bb0 Merge pull request #259 from vmchale/master
Accord with new pattern-match
2021-01-01 11:52:44 +05:30
Vanessa McHale
ec1c3e0159 update changelog 2020-12-31 20:19:10 -06:00
Vanessa McHale
2a1a18023a Accord with new pattern-match 2020-12-31 20:17:22 -06:00
Tomas Janousek
ff738988d3 github: Sync test workflow with that of xmonad-contrib 2020-12-16 11:24:15 +00:00
Sibi Prabakaran
fc4657d529 Merge pull request #252 from slotThe/unused-imports
Get rid of unused imports
2020-12-16 10:30:05 +05:30
Tomáš Janoušek
bd961b7866 Merge pull request #255 from felixonmars/patch-1
Correct a typo in Layout.hs
2020-12-16 01:16:05 +00:00
Felix Yan
3df77d6f20 Correct a typo in Layout.hs 2020-12-16 00:54:36 +08:00
Yecine Megdiche
b59c768cdd Updated CONTRIBUTING.md and MAINTAINERS.md (#253)
* Updated CONTRIBUTING.md and MAINTAINERS.md

* Fixed broken GitHub links
* Added instructions on how to run tests
* Linked XMonad.Doc.Developing

* updated hackage link
2020-12-15 21:19:07 +05:30
Sibi Prabakaran
a37a3cb6e8 Merge pull request #254 from slotThe/fix-LR
Rename LR = L | R to CLR = CL | CR
2020-12-14 18:07:30 +05:30
slotThe
823581816a Conditionally error on unused imports
This turns off the warnings about unused imports _unless_ one is using
the oldest supported version of GHC (right now that's 8.4.4 or older);
then it turns them into errors!  This prevents xmonad from emitting
warnings about imports that have to be there due to backwards
compatibility, but are obsolete in newer versions (think MFP), while at
the same time preventing bitrot.
2020-12-13 22:15:41 +01:00
slotThe
3ea0d74954 Drop unsupported GHC versions from tested-with
Removes all versions of GHC that are not part of the CI, as these can't
be guaranteed to be built against master every time
2020-12-13 22:15:41 +01:00
slotThe
b3c860b892 Rename LR to CLR
Some modules in xmonad-contrib define their own LR type with L and R as
data constructors, leading to build failures; this fixes that.
2020-12-13 17:23:14 +01:00
slotThe
958e701bf4 Get rid of unused imports
Starting with 28e75da77f we only support
GHC versions 8.4.3 and up (more precisely, the GHC version associated
with stackage lts-12.0 and up).  The imports in question are now in
Prelude and need not be imported explicitly.
2020-12-13 15:57:19 +01:00
Sibi Prabakaran
28e75da77f Merge pull request #251 from xmonad/github-ci
Add github CI integration
2020-12-12 12:51:48 +05:30
Sibi Prabakaran
a812869c0c Use v2 of cache. Thanks to @liskin for the help! 2020-12-12 12:15:40 +05:30
Sibi Prabakaran
96fb01b9be Add lts-12 2020-12-12 12:09:15 +05:30
Sibi Prabakaran
6fa0bb7d4f Remove travis rule 2020-12-11 18:10:35 +05:30
Sibi Prabakaran
0a040cbc96 Add github CI integration 2020-12-11 17:49:45 +05:30
Sibi Prabakaran
96d4f1fe85 Merge pull request #219 from jumper149/master
Allow pattern-matching on 'XMonad.Layout.Choose' by exporting constructors
2020-12-08 21:14:27 +05:30
Felix Springer
30f2d9f325 Merge branch 'master' into master 2020-12-08 16:41:36 +01:00
Sibi Prabakaran
5be975b4f2 Merge pull request #247 from srid/patch-1
Fix dzen URL
2020-11-25 11:23:56 +05:30
Sridhar Ratnakumar
22c370a068 Fix dzen URL
dzen has moved to GitHub
2020-11-24 12:40:10 -05:00
Brent Yorgey
c3e032e08e Merge pull request #242 from liskin/layoutclass-typeable
Make layouts Typeable
2020-11-09 14:14:13 -06:00
Peter Simons
2c3bf17dfb Merge pull request #244 from blackgnezdo/flag-fix
Add required + before flag name cabal.project
2020-11-09 07:40:21 +01:00
Greg Steuck
a926b68838 Add required + before flag name cabal.project
This fixes the build with cabal-3.4.
2020-11-08 20:53:28 -08:00
Tomas Janousek
6dc1e319d1 Make layouts Typeable
This makes it possible to query the current layout state, which might be
useful to e.g. show the current X.L.WorkspaceDir in xmobar.

Example of use (assuming myLayout is the layout that is assigned to
layoutHook):

    asMyLayout (Layout l) = (`asTypeOf` myLayout) <$> cast l

    …

    layout <- asMyLayout . W.layout . W.workspace . W.current <$> gets windowset
    case layout of
        Just (WorkspaceDir d) -> …

Unfortunately this requires adding the Typeable constraint to a bunch of
classes in xmonad-contrib, so we need to merge those changes there first
(fortunately it doesn't need to go in lockstep, adding a Typeable
constraint to those classes in xmonad-contrib is harmless).
2020-11-04 15:28:04 +00:00
Peter Simons
0db71d552a Merge pull request #221 from liskin/float-dimensions
Use current screen to set dimensions of new floating windows
2020-08-25 12:49:53 +02:00
Peter Simons
f52ed1d19e Merge pull request #224 from dreamsmasher/master
Fixed typo in Main.hs
2020-08-25 12:48:03 +02:00
Peter Simons
ffcb01ad80 travis.yml: build GenerateManpage when compiling with ghc-8.6.x or later
Older versions will probably choke on pandoc-2.10.x.
2020-08-25 11:50:52 +02:00
Peter Simons
66d2241703 GenerateManpage: port the utility to pandoc 2.10.x 2020-08-25 11:46:30 +02:00
Peter Simons
11814bfec3 cabal.project: enable the generatemanpage flag by default in developer builds 2020-08-25 11:46:06 +02:00