Commit Graph

627 Commits

Author SHA1 Message Date
okan
d5979e3ab6 Minimize trivial differences between a few kb and mb functions. 2014-01-29 22:30:00 +00:00
okan
e2d5d73e53 keybinding -> key binding 2014-01-29 21:17:33 +00:00
okan
78ff1f748c Merge keybinding and mousebinding queues into using the same merged
struct, binding; they were essentially the same accept for what was
'pressed', keysym or button.
2014-01-29 21:13:52 +00:00
okan
cd007c0d08 Much like we do for keyboard and mouse bindings, remove duplicates for
command name - last match.
2014-01-29 18:43:27 +00:00
okan
2ffb124daa Check command name/path for truncation and provide user feedback during
config parse (and use conf_cmd_add to populate defaults); based on a
discussion with Tiago Cunha.  While this looks ugly, there are likely
some other changes here to come.
2014-01-29 18:34:22 +00:00
okan
0590f4c1fc Check ignore windowname for truncation and provide user feedback during
config parse; based on a discussion with Tiago Cunha.
2014-01-28 20:22:21 +00:00
okan
2d6c7c78d8 The EWMH spec states that if the cardinal returned is 0xFFFFFFFF (-1)
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-28 13:40:40 +00:00
okan
e395fd7bea Move conf_init/clear into main - no behaviour change; from Tiago Cunha. 2014-01-28 00:42:20 +00:00
okan
beb28798ef move some init up and shed some blank lines 2014-01-27 15:13:09 +00:00
okan
fad126f1a3 simplify parse_config using assignment; inspired by a very old diff from
Tiago Cunha.
2014-01-27 14:49:40 +00:00
okan
d0425acdda more range checking 2014-01-24 22:38:02 +00:00
okan
66e13c1a60 correct arguments and drop the cast.
sanity check by oga@nicotinebsd
2014-01-24 15:08:06 +00:00
okan
9ffdedb82e no need to quote within warning 2014-01-23 17:13:38 +00:00
okan
40c619037f If no title is supplied, term uses only the basename for its title.
This is useless when searching for windows launched via the ssh command
menu; supply a more useful title: '[ssh] <hostname>'.

Idea from todd@, ok todd@
2014-01-23 16:51:28 +00:00
okan
b740a0a91a zap whitespace 2014-01-22 22:41:09 +00:00
okan
fa2846fe29 cwm_argv doesn't need to be global any longer 2014-01-22 22:26:05 +00:00
okan
3aff0ea880 start properly releasing X resources during teardown 2014-01-22 22:14:02 +00:00
okan
3b8ad25f38 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
okan
b92e846e56 Sprinkle a few more const; from Tiago Cunha. 2014-01-21 15:42:44 +00:00
okan
69bb069674 Save the ptr position before lowering via kbd, so as to be able to cycle
back with the pointer in the right place; matches behaviour when
lowering via the mouse function.
2014-01-20 23:18:47 +00:00
okan
57bbf0fd90 merge KBFLAG_NEEDCLIENT and MOUSEBIND_CTX_*; brings kbfunc and mousefunc
bits even closer.
2014-01-20 23:03:51 +00:00
okan
42e2d07b2b Use argument to pass down flags for mousefunc cyclegroup; removes
rcyclegroup wrapper need - now similar to kbfunc.
2014-01-20 22:31:53 +00:00
okan
9a540a7adb constify and rename some confusing variables around cmdq. 2014-01-20 21:34:32 +00:00
okan
7e2aa0c80b - remove redundant range check for buttons in conf_bind_mouse.
- make conf_bind_kbd return error on non-matches to match what
   conf_bind_mouse does.
 - rename some variables while here for clarity.
 - constify bind and cmd.

from Tiago Cunha.
2014-01-20 19:06:04 +00:00
okan
83b0cbf116 Add a function that adds an entry to a menuq, normalizing a common code
path; from Tiago Cunha.
2014-01-20 18:58:03 +00:00
okan
72ccee09ff use consistent types 2014-01-03 15:29:06 +00:00
okan
a2ae5b4d2d state is long 2014-01-03 14:23:50 +00:00
okan
9fbf947a27 calculate proper menu width/height on the first Expose event; 'jump' (while using gap) noticed by Christian Neukirchen 2014-01-02 22:49:10 +00:00
okan
c0d34338d1 Accept _NET_CURRENT_DESKTOP ClientMessage; from Thomas Adam, though
instead of group toggle, group only.
2014-01-02 22:43:55 +00:00
okan
37b3ff69f9 Accept _NET_WM_DESKTOP clientmessage; from Thomas Adam 2014-01-02 22:26:27 +00:00
okan
24e4f6a4b6 bring mousefunc closer to kbfunc 2014-01-02 21:30:20 +00:00
okan
424dc78f8e gc keycode in keybinding since we only deal with keysym now 2014-01-02 21:17:23 +00:00
okan
6dd84359f1 rename for clarity 2014-01-02 21:15:39 +00:00
okan
164bcbb443 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
okan
434826524f missing stdarg.h include 2013-12-17 16:12:18 +00:00
okan
d504b54a27 replace with memset 2013-12-17 16:10:43 +00:00
okan
468c12c5da 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
okan
4104232e02 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
okan
5671dd5497 Instead of using work area, use the Xinerama area for snap calculations;
based on a patch from Thomas Adam with appropriate adjustments for gap.
2013-12-13 21:51:56 +00:00
okan
8730d44943 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
okan
c11a490e80 stray space and sort while here 2013-12-13 14:45:47 +00:00
okan
1d68a42ec0 Add support for XUrgency and matching _NET_WM_STATE_DEMANDS_ATTENTION
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-13 14:40:52 +00:00
okan
baac27374e Make sure we really take work area gap into account with snap calculations;
from Dominik Honnef via Christian Neukirchen.
2013-12-12 21:50:50 +00:00
okan
e5da774880 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
okan
c16e20981c we don't need to manage the save-set since we're not reparenting; left-over from pwin 2013-12-11 22:14:23 +00:00
okan
f1494daf70 since we are drawing in unhide, no need to during client setup 2013-12-11 17:23:31 +00:00
okan
b5f3d28152 apply mwm hints later 2013-12-11 15:46:47 +00:00
okan
3d5c10942f 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
okan
5da88fd68f Remove extra work and simplify client state handling. 2013-12-11 14:16:09 +00:00
okan
33eb08de92 Stash Class and WM Hints in client_ctx 2013-12-11 14:09:21 +00:00