198 Commits

Author SHA1 Message Date
Spencer Janssen
d21e61a315 TODO for scan 2007-06-11 21:42:17 +00:00
Jason Creighton
854d3239cc comment only 2007-06-11 02:02:49 +00:00
David Roundy
c8b6388fb8 a few modifications to event-sending to make Tabbed layout work. 2007-06-10 15:38:36 +00:00
David Roundy
ab6f210300 implement Spencer's decoration suggestion. 2007-06-10 01:22:37 +00:00
Andrea Rossato
e1885f27e1 haddock compatibility 2007-06-10 12:37:46 +00:00
Don Stewart
6365601c77 Move state logging into Config.hs, via logHook :: X () 2007-06-10 06:19:32 +00:00
Stefan O'Rear
1c3931a0d6 Give refresh sole responsibility for establishing window properties (-3 loc) 2007-06-09 18:58:35 +00:00
Stefan O'Rear
7706f38dc8 Give refresh sole responsibility for establishing window properties (-3 loc) 2007-06-09 18:58:35 +00:00
Don Stewart
0ada17c34a HEADS UP: (logging format change). use a custom pretty printer, for an easier format to parse, than 'show' produces 2007-06-09 13:17:16 +00:00
Spencer Janssen
cf9828cbcd Fix unmap handling
According to the ICCCM, clients should send a synthetic unmap event when they
initiate an unmap.  The old code waited for these synthetic unmaps to unmanage
windows.  However, certain 'obsolete' clients do not send synthetic unmaps
(notably xpdf's find dialog).  These windows entered a zombified state: xmonad
does not manage them, yet they are still mapped and raised on screen.

The new algorithm (derived from wmii):
 - track windows that are mapped on screen
 - track the number of expected unmap events for each window, increment every
   time 'hide' is called on a window that is not mapped.
 - decrement the expected unmap counter on each unmap event
 - treat an unmap event as genuine (ie. unmap the window) when:
    - the event is synthetic (per ICCCM)
    - OR there are no expected unmap events for this window
2007-06-06 21:40:06 +00:00
Jason Creighton
5da458c755 move extraModifiers/cleanMask to Operations.hs
so XMonadContrib can use them
2007-06-06 00:50:56 +00:00
Don Stewart
86ea7f7bc0 whitespace 2007-06-06 02:48:57 +00:00
Don Stewart
7ae7029b50 Enable logging of state changes to stdout 2007-06-05 08:37:35 +00:00
Don Stewart
21e09361a6 remove accidental logging of events 2007-06-05 08:14:52 +00:00
Don Stewart
8f200d408f Fix lost eventNotifyMask bug
When resuming, we were (implicitly) relying on 'scan' to find all
windows, and reset their event masks and WM_STATE. When we moved to
Iconfified hidden workspaces, 'scan' would only find and reset states on 
the current workspace.

The result being that hidden workspace windows no longer received
enterNotify events.

Fix this by traversing the StackSet serialised during a restart, setting
the intial X states for each window, whether visible or hidden.
2007-06-05 04:30:40 +00:00
Spencer Janssen
4d74099851 Comment only 2007-06-04 20:36:59 +00:00
Spencer Janssen
795e96d353 Dump state at launch (commented for now) 2007-06-04 16:24:50 +00:00
Spencer Janssen
f2eb5ac6bb base >= 2.0 means we can use forM_ 2007-06-04 05:09:14 +00:00
Stefan O'Rear
e4e1724842 Remove no-longer-needed 'dimensions' state (-5 loc) 2007-06-04 04:47:15 +00:00
Stefan O'Rear
cd73165c63 Set WM_STATE, iconify invisible windows (+9 loc)
Note that this breaks compatibility with certain programs described as
"obsolete" in the ICCCM (1994).  See the command above the UnmapEvent handler
for details.
2007-06-04 04:23:43 +00:00
Don Stewart
225a2e89a3 clean up Main.hs slightly 2007-06-04 03:56:37 +00:00
Stefan O'Rear
f06d042b56 do not cache atom values within Xmonad, instead let Xlib worry about caching (a documented feature) 2007-06-04 01:39:38 +00:00
Spencer Janssen
29a32bc146 Honor configure requests from unmanaged windows 2007-06-03 23:47:30 +00:00
Spencer Janssen
27b7cccd3a -Wall police 2007-06-03 21:20:55 +00:00
Stefan O'Rear
b20a9cff7f Correctly handle resize requests (-12 +22)
Xmonad now implements resize requests in a consistent manner.

* If the window is FLOATING, we implement the program's request, and
  correctly update the StackSet; so it will keep the new size.  This
  should work correctly even for non-current windows.

* Otherwise, we ignore the request.  As per ICCCM, we send a fake
  ConfigureNotify containing the new (unchanged) geometry.  This is
  perfectly ICCCM compliant, and if it breaks your client, it's your
  own fault.

This patch requires setConfigureEvent, which is added to X11-extras by
a patch approximately contemporaneous with this one.
2007-06-03 20:31:53 +00:00
Jason Creighton
72a50ead89 make mouse bindings configurable 2007-06-02 04:06:47 +00:00
Jason Creighton
b46a449baf ignore numlock/capslock on mouse bindings 2007-06-01 01:51:37 +00:00
Don Stewart
777cf28bdf clean up mouse code a bit 2007-05-31 08:53:08 +00:00
Jason Creighton
3cb64d7461 first shot at a floating layer
This is a first attempting at a floating layer:

mod-button1: move window
mod-button2: swapMaster
mod-button3: resize window

mod-t: make floating window tiled again

Moving or resizing a window automatically makes it floating.

Known issues:

Hard to manage stacking order. You can promote a window to move it to the top,
(which you can do with mod-button2) but it should be easier than that.

Moving a window by dragging it to a different Xinerama screen does not move it
to that workspace.

Code is ugly.
2007-05-31 04:47:33 +00:00
Don Stewart
0cca848c54 be sure to reset the gap list on rescreen 2007-05-28 03:18:35 +00:00
Don Stewart
c613073cb6 support per-screen gap settings. you can have different gaps on individual screens now 2007-05-28 03:15:01 +00:00
Don Stewart
1d2c5ca35a Use (Int,Int,Int,Int) for arbitrary gaps on any side of the screen 2007-05-28 02:51:35 +00:00
Don Stewart
bb4bd97c87 mod-b, toggle on or off the status bar gap 2007-05-27 12:59:28 +00:00
Don Stewart
fdc6af5faa clean Main.hs slightly 2007-05-27 07:21:06 +00:00
Don Stewart
3202fa0673 refactor using whenX 2007-05-22 04:31:16 +00:00
Spencer Janssen
07a354e5a3 Add preliminary randr support 2007-05-22 04:02:28 +00:00
Spencer Janssen
a9d7b7ef49 Experimental support for a beefier restart. 2007-05-21 19:46:53 +00:00
Spencer Janssen
b59d4d1dc0 Make screen info dynamic: first step to supporting randr 2007-05-21 15:27:59 +00:00
Jason Creighton
02073c547b s/workspace/windowset/ 2007-05-21 04:03:30 +00:00
Don Stewart
77e46027ed HEADS UP: Rewrite StackSet as a Zipper
In order to give a better account of how focus and master interact, and
how each operation affects focus, we reimplement the StackSet type as a
two level nested 'Zipper'. To quote Oleg:

    A Zipper is essentially an `updateable' and yet pure functional
    cursor into a data structure. Zipper is also a delimited
    continuation reified as a data structure.

That is, we use the Zipper as a cursor which encodes the window which is
in focus. Thus our data structure tracks focus correctly by
construction! We then get simple, obvious semantics for e.g. insert, in
terms of how it affects focus/master. Our transient-messes-with-focus
bug evaporates. 'swap' becomes trivial.

By moving focus directly into the stackset, we can toss some QC
properties about focus handling: it is simply impossible now for focus
to go wrong. As a benefit, we get a dozen new QC properties for free,
governing how master and focus operate.

The encoding of focus in the data type also simplifies the focus
handling in Operations: several operations affecting focus are now
simply wrappers over StackSet.

For the full story, please read the StackSet module, and the QC
properties.

Finally, we save ~40 lines with the simplified logic in Operations.hs

For more info, see the blog post on the implementation,

    http://cgi.cse.unsw.edu.au/~dons/blog/2007/05/17#xmonad_part1b_zipper
2007-05-20 07:00:53 +00:00
Spencer Janssen
72e7bed426 Handle empty layout lists 2007-05-04 04:56:44 +00:00
Jason Creighton
b5ed587f2e use anyKey constant instead of magic number 2007-05-04 01:50:43 +00:00
David Roundy
ea1134db26 add support for extensible layouts. 2007-05-03 14:47:50 +00:00
Spencer Janssen
b63e8c029e Use updated refreshKeyboardMapping. Requires latest X11-extras 2007-05-03 03:20:40 +00:00
Spencer Janssen
08e514b28f Add Config.hs-boot, remove defaultLayoutDesc from XConf 2007-04-30 16:26:47 +00:00
Spencer Janssen
5d086df912 Add XConf for values that don't change. 2007-04-30 05:47:15 +00:00
Jason Creighton
bdbca84bcd configurable border colors
This also fixes a bug where xmonad was assuming a 24-bit display, and just
using, eg, 0xff0000 as an index into a colormap without querying the X server
to determine the proper pixel value for "red".
2007-04-30 04:38:59 +00:00
Jason Creighton
90b4eb607c avoid grabbing all keys when a keysym is undefined
XKeysymToKeycode() returns zero if the keysym is undefined. Zero also happens
to be the value of AnyKey.
2007-04-28 18:00:46 +00:00
Jason Creighton
767bc68acf Ignore numlock and capslock in keybindings 2007-04-24 01:33:57 +00:00
Spencer Janssen
70a87063d1 Clear numlock bit 2007-04-24 01:03:52 +00:00