Commit Graph

259 Commits

Author SHA1 Message Date
5fcf251672 Only when mapping clients from an initial wm start or restart, query the
pointer and if it matches the child window, activate it; new clients
will not need to make this roundtrip to the server.

Based on a patch from Preben Guldberg.
2015-09-23 14:09:40 +00:00
28d4001eca Mechanical change: group->gc 2015-08-27 18:53:14 +00:00
f467838e7b Add consistent checks against NULL. 2015-08-27 18:42:56 +00:00
19826222f6 Move client cycle grab/ungrab into a more relevant place; while here,
update comments about why we need to grab/ungrab the keyboard.
2015-08-27 18:40:09 +00:00
96262a6b0c Split out sticky mode checks and the restoring of a client's group and
_NET_WM_DESKTOP from the config-based auto-grouping; no (intentional)
behavior changes.  Needed for further work in cleaning up this area.
2015-08-25 18:29:10 +00:00
dcfbc9e809 Implement _NET_CLIENT_LIST_STACKING (from Thomas Admin), but
bottom-to-top order, as per spec (notified Thomas as well).
2015-08-24 15:42:57 +00:00
97db17d056 Don't allow freeze operations on fullscreen (consistent with what
fullscreen does).
2015-08-24 14:57:19 +00:00
b224945446 Move CLIENT_STICKY logic from client hide/unhide to group hide/unhide;
rationale being that clients should be able to hide/unhide independently
of group switching.
2015-08-23 17:31:20 +00:00
cd3bbb1c9c Fix whitespace. 2015-08-21 16:52:37 +00:00
1d31f9000c Add client freeze extension to _NET_WM_STATE Atom, allowing flag to
persist. As usual with new Atoms, requires X restart.
2015-08-21 16:30:02 +00:00
05478f061e _NET_WM_STATE_STICKY implies only sticky at the group/desktop level, not
position and size; based on discussion with a few.
2015-08-21 16:14:39 +00:00
871c9f24ba Bring group and client cycle closer together. 2015-08-21 15:52:49 +00:00
cb900def7f style 2015-07-01 14:36:42 +00:00
8515d717ae Re-implement XClientMessage handling so that we can feed screen_find and
client_find valid resources as needed, relieving the need for
screen_find to ungracefully handle invalid root windows. Removes a long
standing XXX.  Should theoretically allow XClientMessage handling on
more than one X screen.  Alter callers of screen_find to handle
failures.
2015-06-30 14:01:43 +00:00
e7b4045ece move client_find down 2015-06-28 19:54:37 +00:00
17720de4ab replace assert usage 2015-06-28 19:50:46 +00:00
66bc416217 Mechanical change from xinerama to region backed areas. 2015-06-26 17:17:46 +00:00
9180bb1a06 stash window dimensions 2015-06-08 15:11:29 +00:00
31d4fe9f33 fill in mwm defines 2015-05-20 23:54:39 +00:00
557cd382dc plug a leak 2015-03-29 00:21:05 +00:00
5146f661bd First restore net_wm_state(ewmh), then wm_state(iccc); prevents clients
from re-hiding on restart due to flag toggling (note that this is ripe
for re-vamping). Behavior only observed on restarts.

Problem found by, and initial patch from, Henri Kemppainen (thanks!),
though ever so slightly different one applied.
2015-01-23 19:35:11 +00:00
7936b9b2a7 Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAX
and HOST_NAME_MAX+1, respectively.

ok doug@
2015-01-19 14:54:16 +00:00
e9dbd150ea these have nothing to do with 'sticky', but rather group membership; rename. 2014-09-27 19:04:32 +00:00
8fd0f43ec2 these client actions are just toggles; less confusing with better names 2014-09-17 18:41:44 +00:00
458dd31b93 ewmh states _NET_WM_STATE_STICKY should not alter position 2014-09-17 18:09:30 +00:00
7eef4eb63d don't toggle _WM_STATE_HIDDEN here yet 2014-09-17 16:30:21 +00:00
a61812d52d Implement EWMH _NET_WM_STATE_HIDDEN. 2014-09-17 16:00:44 +00:00
4b6dc96398 use similiar style for client flags 2014-09-15 13:00:49 +00:00
d27fc99784 fold in 'active' into 'flags' 2014-09-10 20:30:38 +00:00
20c1113fdd move the check for an empty queue up during cycle 2014-09-08 21:24:27 +00:00
aac16013d2 name the group client queue appropriately, like other queues 2014-09-08 21:15:14 +00:00
b64ce8558c more style nits and wrapping 2014-09-08 20:37:02 +00:00
bc70374264 since mruq has been folded in, rename mru-named functions 2014-09-08 20:32:40 +00:00
26ba152692 Remove duplicate client queue (mruq); instead, remove and take the
global Clientq and place it inside screen_ctx since every client belongs
to a screen, then use the same per screen clientq to track stacking
order (the sole reason for mruq).
2014-09-08 20:11:22 +00:00
3d12b6d1d9 more style nits 2014-09-07 19:27:30 +00:00
be091b3523 screen_fromroot -> screen_find 2014-09-07 17:38:38 +00:00
7314a3aefd Implement _NET_WM_STATE_STICKY, bound to CM-s by default; allows any
client to 'stick' to all desktops (ewmh speak) or groups - this
currently has the same affect as setting a client's group to 'nogroup',
with the exception that the client can also be in a group, so when
un-sticking, the client will go back to its original group/desktop.
2014-08-25 12:49:19 +00:00
b31b09dfc2 Purely mechanical; unify 'num', 'no' and 'shortcut'. 2014-08-20 15:15:29 +00:00
98d8483d35 Some clients set the urgency flag even if they are the active client;
prevent annoying behavior by only setting the cwm urgency flag if the client
is not active; diff from Thomas Adam.
2014-02-06 20:58:46 +00:00
ad96c16838 Move redundant bits from screen_init (while dealing with existing
clients) directly into client_init, performing the X roundtrip only
once. With the previous change in maprequest, this moves decision making
into one place for creating new clients.
2014-02-03 20:20:39 +00:00
ad76995af7 Move redundant window attr fetch from maprequest directly into
client_init and perform that X roundtrip only once.
2014-02-02 21:34:05 +00:00
0608610cc7 move some init up and shed some blank lines 2014-01-27 15:13:09 +00:00
08342471c8 state is long 2014-01-03 14:23:50 +00:00
8420398068 rename for clarity 2014-01-02 21:15:39 +00:00
46b1d6ef1e When a client doesn't specify size hints, nothing prevents a resize to
0x0 - don't allow this situation during mouse resize (check already in
place for kbd resize).

Reported by brynet@
2014-01-02 20:58:20 +00:00
da2bea3ffa replace with memset 2013-12-17 16:10:43 +00:00
19fc7f666b Implement support for EWMH's _NET_WM_STATE_FULLSCREEN hint.
Since we already have a form of 'maximize', we need to differentiate
between 'maximize' and the new 'fullscreen' mode.  The 'maximize' mode
will continue to honor gap but now *retains* the border, matching the
'vert/horz maximize' behaviour.  The new 'fullscreen' mode supports and
follows the _NET_WM_STATE_FULLSCREEN hint, allowing the client perform
additional window modifications; in this mode, cwm(1) will *ignore* gap,
remove borders and freeze(move/resize) the client.  Additionally,
'fullscreen' mode will remember various combinations of previous states.

* default keybinding changes: CM-f 'fullscreen', CM-m 'maximize' (re-map
  as desired).

Positive feedback from a few, testing and ok sthen@
2013-12-16 19:02:17 +00:00
f98f4615c0 Teach screen_find_xinerama() to apply gap only when told to do so;
adjust callers.  Needed for an upcoming feature.
2013-12-13 22:39:13 +00:00
91a29396e8 we need the save-set when re-exec'ing so as to not lose State on our hidden clients 2013-12-13 15:56:44 +00:00
b276a2ef00 ICCCM explicitly states that server time (CurrentTime) should *not* be
used for focus events, but rather the timestamp of the generated event.
Track the last event timestamp and send it down for a WM_TAKE_FOCUS
ClientMessage.  I suspect we should do this for clients that don't
announce this Atom as well, though the raciness gets us into a bind.

Solves focus order issue since WM_TAKE_FOCUS; fix verified by sthen@

ok sthen@
2013-12-12 20:15:07 +00:00