aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c (unfollow)
Commit message (Collapse)AuthorLines
2017-12-29As done for buttonrelease, work specific un-cycling and un-highlighting actionsokan-2/+13
into the keyrelease event, only performing what's actually needed for each; should result in much fewer events against keyreleases. No intended behaviour change. Additionally, like we do for group membership, grab the keyboard only when required for cycling.
2017-12-29Merge group_toggle_membership_leave into the buttonrelease event and only dookan-3/+5
border work for a group/ungroup action.
2017-12-29add helper function client_show to bring together like actions for unhide/raiseokan-5/+2
2017-12-27Use poll and XNextEvent to replace XNextEvent blocking inside the x11 eventokan-6/+8
handler.
2017-05-09drop obsolete commentokan-2/+1
2017-05-09Alter callbacks to take a struct instead of a growing number of arguments;okan-7/+9
greatly simplifies upcoming work.
2016-10-18Refactor callbacks to take a void * so as to not try and generalize intookan-20/+32
client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's based on context. While here, limit some globals, replace defines with appropriate variables and fix some naming.
2016-10-06Add an argument to the callbacks to pass the xevent context, button orokan-3/+3
key press. This allows to remove a few hacks to duplicate functions only for behaviour changes; now differing behaviours are pushed down to the callback. Also will allow for previously unavailable actions to be bind-able down the road.
2016-10-04When removing xrandr regions, ensure clients are within the bounds ofokan-1/+2
the screen; adapted from an ancient diff from Sviatoslav Chagaev. Things in this area will likely change, but put this in so it works now and serves as a reminder.
2016-10-03client_ptrwarp should not deal with unhiding or raising clients (non ptrokan-1/+5
requests); most callers do this already - deal with the few that do not. client_ptrwarp becomes a simple wrapper (setpos) but it will be expanded.
2016-09-16During init, query screen for _NET_ACTIVE_WINDOW and set that client asokan-2/+2
active; while we already look at what's under the pointer, use this information first, then look under the pointer (saving that round-trip). This restores the active state to a client after restart even if the pointer is not above it (and of course the pointer is not above another client).
2016-09-14Fix-up a few simple uses of client_current(): check CLIENT_ACTIVE flagokan-4/+7
instead of relying on curcc.
2015-11-10Start cleaning up name vs function differences; replace magic numbers.okan-3/+3
2015-08-27Add consistent checks against NULL.okan-4/+4
2015-07-01styleokan-2/+2
2015-06-30Re-implement XClientMessage handling so that we can feed screen_find andokan-39/+43
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-01-19Switch to limits.h; replace MAXPATHLEN and MAXHOSTNAMELEN with PATH_MAXokan-2/+3
and HOST_NAME_MAX+1, respectively. ok doug@
2014-09-27these have nothing to do with 'sticky', but rather group membership; rename.okan-2/+2
2014-09-15use similiar style for client flagsokan-2/+2
2014-09-07screen_fromroot -> screen_findokan-5/+5
2014-09-06Rework group names: stash the group name inside the group_ctx as opposedokan-2/+2
to having to manage an array outside in screen_ctx for group names and shortcuts. Simplifies (and moves bits for) reading, and constructing data for, EWMH's _NET_DESKTOP_NAMES.
2014-02-03Move redundant bits from screen_init (while dealing with existingokan-2/+2
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-02Move redundant window attr fetch from maprequest directly intookan-7/+4
client_init and perform that X roundtrip only once.
2014-01-30Move cwm_status around to avoid header fu, and remove extraneous signalokan-2/+1
header from xevents.c; noticed by Christian Neukirchen.
2014-01-29Merge keybinding and mousebinding queues into using the same mergedokan-6/+6
struct, binding; they were essentially the same accept for what was 'pressed', keysym or button.
2014-01-28The EWMH spec states that if the cardinal returned is 0xFFFFFFFF (-1)okan-3/+12
then the window should appear on all desktops, which in our case is assigned to group 0. Found to fix stalonetray due to the non-ewmh aware range checking in group_movetogroup(); from Thomas Adam.
2014-01-22Somewhat streamline event loop/restart/quit handling; most notableokan-11/+7
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-20merge KBFLAG_NEEDCLIENT and MOUSEBIND_CTX_*; brings kbfunc and mousefuncokan-4/+4
bits even closer.
2014-01-03use consistent typesokan-3/+3
2014-01-02Accept _NET_CURRENT_DESKTOP ClientMessage; from Thomas Adam, thoughokan-2/+8
instead of group toggle, group only.
2014-01-02Accept _NET_WM_DESKTOP clientmessage; from Thomas Adamokan-1/+5
2014-01-02bring mousefunc closer to kbfuncokan-2/+2
2013-12-13stray space and sort while hereokan-5/+4
2013-12-13Add support for XUrgency and matching _NET_WM_STATE_DEMANDS_ATTENTIONokan-1/+2
ewmh hint; urgencyborder is configurable. The urgency flag will stick, even while on a client in a non-viewable group, until the client receives focus (where the border is reset). Initial diff from Thomas Adam with some changes/enhancements from me.
2013-12-12ICCCM explicitly states that server time (CurrentTime) should *not* beokan-1/+3
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-11Add client wrapper for XWMHints to support XA_WM_HINTS in PropertyNotifyokan-1/+4
events; based off a diff from Thomas Adam.
2013-12-11Remove extra work and simplify client state handling.okan-3/+2
2013-12-02Since we use IconicState as our hidden state, check for the hidden flagokan-3/+5
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-11-27Remove the option to bind a key by keycode with brackets; it neverokan-4/+2
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-27Rewrite active/inactive client handling in client_setactive();okan-17/+6
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-12Alter the r1.35 of event.c race fix. Remove the forward looking eventokan-17/+5
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-10-25A client_delete should behave differently depending on whether theokan-3/+3
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-07-15collapse linesokan-7/+5
2013-07-15simplify atom handling; allows us to limit to one round-trip to serverokan-6/+6
for gathering Atoms.
2013-07-10bring buttonpress and keypress event handlers slightly closer togetherokan-9/+8
2013-07-08move kbfunc and mousefunc closer togetherokan-3/+3
2013-07-08whitespace and style fixes; from Tiago Cunha and one from me.okan-2/+2
2013-06-10move synthetic responses and have client_msg only work with WM_PROTOCOLS,okan-2/+2
since that's all ClientMessageEvent is for anyway.
2013-06-10Check for, and honour, CWStackMode and CWSibling change requests during aokan-2/+6
ConfigureRequest event. Additionally, honour a border width change; detailed report and patch from Mike Small.
2013-05-23alter conf_grab(_kbd) to first ungrab AnyKey/AnyModifier, then proceedokan-8/+6
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.