Commit Graph

173 Commits

Author SHA1 Message Date
5fd119daea cvsimport 2014-01-24 22:38:02 +00:00
77aa5ac45b Somewhat streamline event loop/restart/quit handling; most notable
change allows a restart to trigger proper teardown first, even though
teardown is not (yet) complete.

After some discussion with oga@nicotinebsd.org regarding a more
complicated version/idea.
2014-01-22 21:48:27 +00:00
371902b3c9 cvsimport 2014-01-21 15:42:44 +00:00
c7adadaf9d merge KBFLAG_NEEDCLIENT and MOUSEBIND_CTX_*; brings kbfunc and mousefunc
bits even closer.
2014-01-20 23:03:51 +00:00
86b149ad25 cvsimport 2014-01-03 15:29:06 +00:00
43ccf4eae0 use consistent types 2014-01-03 15:29:06 +00:00
f4c289b9e6 cvsimport 2014-01-03 14:23:50 +00:00
376e98c2c8 Accept _NET_CURRENT_DESKTOP ClientMessage; from Thomas Adam, though
instead of group toggle, group only.
2014-01-02 22:43:55 +00:00
5a5e7441e1 Accept _NET_WM_DESKTOP clientmessage; from Thomas Adam 2014-01-02 22:26:27 +00:00
10d4dcb127 bring mousefunc closer to kbfunc 2014-01-02 21:30:20 +00:00
ddb67559f6 cvsimport 2013-12-13 15:56:44 +00:00
40858be0ae stray space and sort while here 2013-12-13 14:45:47 +00:00
0cad4ef6e0 cvsimport 2013-12-13 12:57:57 +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
140028e905 cvsimport 2013-12-11 22:14:23 +00:00
7e0749b0b1 Add client wrapper for XWMHints to support XA_WM_HINTS in PropertyNotify
events; based off a diff from Thomas Adam.
2013-12-11 15:41:11 +00:00
0d9b1becff Remove extra work and simplify client state handling. 2013-12-11 14:16:09 +00:00
873763f4c6 cvsimport 2013-12-02 20:01:19 +00:00
6b72168d92 Since we use IconicState as our hidden state, check for the hidden flag
and unmanage the client if we're not hidden (basically if NormalState)
during an UnmapNotify event.

Resolves an issue with mplayer going fullscreen while not using NetWM
hints; behaviour regression reported by Ido Admon.
2013-12-02 14:30:12 +00:00
abf52049b9 Remove the option to bind a key by keycode with brackets; it never
worked (and no one complained!).  While it's fairly easy to fix, users
should be using keysym names and not keycodes.

Discussed at length months ago with todd@, matthieu@ and Owain.
2013-11-27 16:24:17 +00:00
fa25915a75 Rewrite active/inactive client handling in client_setactive();
client_leave() served no real purpose, likewise no reason to handle
LeaveNotify events since an EnterNotify will process the next active
client (and we don't have anything important to process anyway), so
xev_handle_leavenotify() goes as well.  Allows a simplification of
client_mtf() and client_cycle_leave() for clarity.  While here, unify a
few client_current() checks.

No intended behaviour change.
2013-11-27 00:01:23 +00:00
3c78191e2e cvsimport 2013-11-12 21:25:00 +00:00
2937b2066f Alter the r1.35 of event.c race fix. Remove the forward looking event
queue check (removing the need for a server grab/ungrab) - if the client
is going away, let it fall all the way through to a DestroyNotify event.
There's no longer a need for us to manually destroy a client ourselves
(removing yet another server grab/ungrab).  Instead, when the
UnmapNotify event is synthetic, simply set the state to Withdrawn (as
per ICCCM), else Iconic (in our case 'hidden').

Verified with test case from the 2009 race which was the original reason
for r1.35 of event.c.
2013-11-12 21:25:00 +00:00
0c99788f66 cvsimport 2013-10-25 19:46:16 +00:00
6e17b41f56 A client_delete should behave differently depending on whether the
triggering event was unmap (with pending destroy) log destroy; we only
need to grab/ungrab the server lock, set WithdrawnState and
XRemoveFromSaveSet clients coming from an unmap event - doing so for
clients coming from destroy are already gone, hence we generate errors.
2013-10-25 19:46:16 +00:00
0dec9e849d cvsimport 2013-07-16 14:30:48 +00:00
4ef96a2772 collapse lines 2013-07-15 23:51:59 +00:00
4119b5c065 simplify atom handling; allows us to limit to one round-trip to server
for gathering Atoms.
2013-07-15 14:50:44 +00:00
93bfc4a5c1 cvsimport 2013-07-10 14:15:58 +00:00
bd7b8163bb bring buttonpress and keypress event handlers slightly closer together 2013-07-10 14:15:58 +00:00
1f244fe29c move kbfunc and mousefunc closer together 2013-07-08 18:19:22 +00:00
7a7e5cd592 whitespace and style fixes; from Tiago Cunha and one from me. 2013-07-08 15:46:16 +00:00
9a12ca3520 cvsimport 2013-06-20 02:33:57 +00:00
6059073a5f move synthetic responses and have client_msg only work with WM_PROTOCOLS,
since that's all ClientMessageEvent is for anyway.
2013-06-10 21:37:30 +00:00
b365ceac0e Check for, and honour, CWStackMode and CWSibling change requests during a
ConfigureRequest event.  Additionally, honour a border width change;
detailed report and patch from Mike Small.
2013-06-10 20:11:43 +00:00
5515a365ba cvsimport 2013-05-29 22:41:51 +02:00
be1a7a3f5c alter conf_grab(_kbd) to first ungrab AnyKey/AnyModifier, then proceed
to grab keys in keybindingq.  we don't need to ungrab/grab on every
addition to the queue, just once with a complete keybindingq; simplify
grabbing keys per screen (during init) and during a MappingNotify.

while here, change conf_grab_{kbd,mouse} to require only a Window.
2013-05-23 16:52:39 +00:00
421bf22ac7 handle _NET_WM_STATE ClientMessage; from Alexander Polakov. 2013-05-21 00:29:20 +00:00
c2042cd523 stray whitespace 2013-05-20 21:32:00 +00:00
ad8020e17d handle _NET_ACTIVE_WINDOW ClientMessage; from Alexander Polakov. 2013-05-20 21:19:15 +00:00
c84145661e add support for _NET_CLOSE_WINDOW 2013-05-19 17:05:52 +00:00
556a50d8f7 treat WM_CHANGE_STATE like other atoms 2013-05-19 17:03:55 +00:00
3253f5a4a1 simplify 2013-05-19 17:01:29 +00:00
2b926784ba new -> init 2013-05-11 22:01:07 +00:00
9b9e95d742 more type fixes for mask/button 2013-05-10 16:32:47 +00:00
e05c0a2c60 int type fixes 2013-05-10 16:05:34 +00:00
457938fbd7 fix KeySym type 2013-05-10 15:44:43 +00:00
843f18aaee cvsimport 2013-04-30 21:12:20 +00:00
94e341725b use an int in screen_init and avoid needing to cast for screen number (which). 2013-04-29 00:56:47 +00:00
a957ed7c7d cvsimport 2013-04-05 17:36:02 +00:00