Commit Graph

144 Commits

Author SHA1 Message Date
okan
b8f53666bd x/y from XSizeHints are obsolete (and have been for a long time), so
instead use x/y from XWindowAttributes when USPosition|PPosition are
set.
2013-11-01 21:54:20 +00:00
okan
06eb13dfd9 re-add support for WM_TAKE_FOCUS, and additionally this time only call
XSetInputFocus() for clients that have the InputHint; latter fix
discovered by Valery Masiutsin with a PoC patch - solves keyboard input
focus loss for java apps.
2013-11-01 14:07:19 +00:00
okan
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
okan
9ff288baef revert 1.138 (WM_TAKE_FOCUS) for now 2013-10-20 01:35:47 +00:00
okan
a2013ee9dd Using xu_btn_ungrab() buttons during client_leave doesn't work (error
BadValue) when the modifier is already AnyModifier .  Instead alter
xu_btn_ungrab() to ungrab AnyButton/AnyModifier and call it only when a
client is coming into focus in client_setactive(), instead of iterating
over ignore mods - matches how we handle key grabs.
2013-10-19 19:39:34 +00:00
okan
083a023f2c I believe we redraw the border in too many cases; likely a leftover from
the cc->pwin days - don't redraw on every unhide, resize, and mouse
move/resize Expose event (note, all Expose events trigger a redraw
anyway).

Tested with some finicky X apps I could think of, though I'm sure others
will find more - if so, and they 'lose' the border, please report!
2013-10-19 18:59:22 +00:00
okan
a70b2d81af For clients that support WM_TAKE_FOCUS in their WM_PROTOCOLS property, send
a ClientMessage event.
2013-10-19 00:24:54 +00:00
okan
6ac51b8e41 unify type; no change 2013-10-03 13:51:57 +00:00
okan
4ef96a2772 collapse lines 2013-07-15 23:51:59 +00:00
okan
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
okan
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
okan
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
okan
284af4ca0c add support for _NET_WM_STATE_MAXIMIZED_{HORZ,VERT}; from Alexander Polakov.
while I'm unsure of the final look of _NET_WM_STATE, there's no reason
to delay this support.
2013-05-20 21:13:58 +00:00
okan
dac00a232f - switch border colors to Xft
- merge border/menu color structures/functions since they now both use Xft
- switch xu_xorcolor to operating on XftColor instead of just
  XRenderColor (basically adding pixel)
- if color name allocation fails, revert back to default (this, along
  with font validation should occur during config parse, but we don't
  have screens setup yet - likely to change at some point)
2013-05-19 23:09:59 +00:00
okan
01bfdd7b42 use XGetWMProtocols and simplify WM_PROTOCOL handling 2013-05-19 17:02:04 +00:00
okan
2b926784ba new -> init 2013-05-11 22:01:07 +00:00
okan
1db7cc2a18 remove group in client_delete directly. 2013-05-06 16:03:11 +00:00
okan
006a29e617 mechanical xu_{get,set}state -> xu_{get,set}_wm_state change 2013-04-17 13:57:06 +00:00
okan
302690624e slightly rework WM_STATE set/get to make it less ambigious; will be more clear
on what needs to change to make it right in the end.
2013-04-17 13:52:20 +00:00
okan
16ed8bf8e4 only a window is required to set WM_STATE. also un-confuse xu_ptr_getpos
by using 'win' instead of 'rootwin' so as not to imply only the root
window is queried, rather any window.
2013-04-14 16:13:17 +00:00
okan
f3dfc4968c we handle WM_STATE here, so remove misleading comment. 2013-04-12 20:54:27 +00:00
okan
ef1b78f464 we already set window state in client_hide or client_unhide right before, so
there's no need to do it again.
2013-04-12 20:45:57 +00:00
okan
670207f79b zap stray whitespace 2013-04-05 17:07:25 +00:00
okan
c5a76f1d5b - no reason to breakout ClassHints work, so fold into client_{new,delete},
but keep _MOTIF_WM_HINTS separate.
- simplify fetching app/class hint.
- fix _MOTIF_WM_HINTS Atom type.
2013-04-03 20:22:55 +00:00
okan
ec4474a33a move XUngrabServer to the end of client_new() to avoid races where clients,
such as those using sdl, attempt to manage the clients themselves when the
clients aren't fully ready.  other wm's grab the xserver during the whole
client setup process, so match.

behavior found by jsg.
2013-04-03 19:20:50 +00:00
okan
3a7596968b add per-group vert/horiz tiling support; introduces 2 new bind commands,
'vtile' and 'htile'; from Alexander Polakov.
2013-01-08 15:16:04 +00:00
okan
bf9d981597 teach screen_find_xinerama() about gap and adjust (simplify) callers;
menu becomes gap-aware for free.
2013-01-08 04:12:51 +00:00
okan
e7b85cfb2f fix menu/client placement in panning setups; XineramaQueryScreens gives
us the width of the psuedo screen, but here we need the edge instead
(xmax/ymax); just re-use w/h here for now.
2013-01-07 21:53:23 +00:00
okan
c426254da5 use cc->bwidth in client_vmax since we've yet to reset it (matches
client_hmax); from Jan Stary
2013-01-06 01:01:26 +00:00
okan
6d123cd96d rename {h,v}max functions for consistency; from Jan Stary 2013-01-04 16:30:03 +00:00
okan
698530155d get rid of struct color 2013-01-04 16:23:04 +00:00
okan
2ac65bd288 re-work client_snapcalc() so it takes client and edge dimensions with
snapdist; allows for simplier snap calculations.

required for an upcoming diff for honoring gap.
2013-01-02 21:37:21 +00:00
okan
ce8ef02ed2 have screen_find_xinerama() return struct geom *reliably* instead of
XineramaScreenInfo; simplifies goop around the callers.
2013-01-02 16:26:34 +00:00
okan
e492ed8e41 more variable consistency 2013-01-02 02:19:20 +00:00
okan
2d28b71a1b info->xine, for consistent variable names 2013-01-02 02:02:08 +00:00
okan
6cb334e503 replace emptystring with strdup here as well so we know we are free'ing
a malloc'd variable everytime; from Tiago Cunha
2013-01-01 14:26:29 +00:00
okan
0957fbbee2 make num of groups no longer off-by-one; from Alexander Polakov
note that a re-exec of cwm will not rewrite the group number atom of
*existing* clients, so they will remain off-by-one until each client has
its atom updated, or of course a restart of X.
2013-01-01 14:19:56 +00:00
okan
fe44d1dfce cmap -> colormap in client_ctx 2012-12-17 18:35:26 +00:00
okan
82e8ec4245 replace client highlight with a client flag 2012-12-17 17:48:57 +00:00
okan
8e67d1389c make client_mtf static 2012-12-17 14:58:46 +00:00
okan
d651c1cc3b current_client() returns _curcc, so use it where appropriate 2012-12-17 14:26:29 +00:00
okan
28224ff830 sort 2012-11-09 03:52:02 +00:00
okan
76b0874b4c get rid of the xfree() wrapper around free(); from Tiago Cunha. 2012-11-07 20:34:39 +00:00
okan
86524e21dd extend client_resize so that it can know when to reset max flags and
bwidth; this allows a client to be resized from a max state, which now
gets treated like a non-max'd client.  based on a diff that does part of
this in a different way from Alexander Polakov.
2012-09-09 19:47:47 +00:00
okan
3f956098d9 unify various max routines to match client placement and partially menu ones
when calculating screen dimensions.
2012-07-16 01:53:14 +00:00
okan
e42d1c7f01 move the HasXinerama check into screen_find_xinerama and simplify logic;
moves closer to logic in menu code.
2012-07-16 01:36:30 +00:00
okan
0e8815dfb0 re-use geom struct in client_ctx (saved)geometry. 2012-07-13 17:01:04 +00:00
okan
186a78ff1e convert xmax/ymax uses to view geometry. 2012-07-13 15:21:35 +00:00
okan
8c7964468f fix missing atom (WM_PROTOCOLS) wrt new style handing; without this, the
window manager didn't know if a client supported CLIENT_PROTO_DELETE and
thus used a hammer, XKillClient.

behaviour reported by Tim van der Molen.
2012-07-04 18:00:13 +00:00
okan
f98e123bfc re-implement atom handing; makes for a normalized and more consistent
separation between cwm and ewmh.  seen by a few.
2012-07-03 13:49:03 +00:00