Commit Graph

296 Commits

Author SHA1 Message Date
okan
0d13b7c220 introduce 'groupsearch' for group menu search; matches on either group
number/shortcut and/or name.
2015-07-12 14:31:47 +00:00
okan
5d8027b75d Introduce a callback for cmd menu printing, special-casing 'lock' and
'term'.
2015-06-30 18:54:12 +00:00
okan
66bc416217 Mechanical change from xinerama to region backed areas. 2015-06-26 17:17:46 +00:00
okan
90288e2fc3 collect 'gap' applications 2015-06-26 16:11:21 +00:00
okan
8aa40078d1 Replace screen region info gathering with XRandR equivalent of Xinerama
queries (currently act on XRandR events anyway). Fall-back mode without
XRandR is still what X provides. This removes -lXinerama.
2015-06-26 15:21:58 +00:00
okan
ee400b08a8 typo in comment; from jsteinha [at] iutbayonne.univ-pau.fr 2015-06-09 13:02:15 +00:00
okan
9180bb1a06 stash window dimensions 2015-06-08 15:11:29 +00:00
okan
a4cba7e113 add a flag to indicate a menu list instead of overloading 'prompt' 2015-06-05 15:01:51 +00:00
okan
b1c2046efd merge kbd and mouse grouptoggle 2015-05-21 00:37:04 +00:00
okan
31d4fe9f33 fill in mwm defines 2015-05-20 23:54:39 +00:00
kspillner
d328f63c7d Make window name and window class separate parameters to conf_autogroup.
No functional change, but will be used shortly.

ok okan@
2015-05-17 04:34:01 +00:00
okan
a4a414b68b Introduce a xreallocarray and convert a few xcalloc instances that do
not require zero'ing.
2015-03-28 23:12:47 +00:00
okan
bad97699f9 Simplify key/mb binding moving argtype into flags and dropping another
variable; removes the need to zero out struct binding, leaving a simple
malloc.
2015-03-26 21:41:43 +00:00
okan
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
okan
836c9f49d6 make group_init work like other *_init's 2014-10-08 12:48:51 +00:00
okan
e9dbd150ea these have nothing to do with 'sticky', but rather group membership; rename. 2014-09-27 19:04:32 +00:00
okan
845e82015c Update _NET_CURRENT_DESKTOP with the screen's group_active->num. 2014-09-23 14:25:08 +00:00
okan
cb65869d7a Move stuff that doesn't belong in group_init; while here, explicitly
initialize hideall and cycling.
2014-09-23 13:45:48 +00:00
okan
8fd0f43ec2 these client actions are just toggles; less confusing with better names 2014-09-17 18:41:44 +00:00
okan
736d973f46 Use a similarly named check as sticky for hidden check in a group. 2014-09-17 16:32:53 +00:00
okan
a61812d52d Implement EWMH _NET_WM_STATE_HIDDEN. 2014-09-17 16:00:44 +00:00
okan
74f4a1bad9 Introduce a check to see if a group holds only 'sticky' clients and use
this check to decide if a group is virtually empty.  Rationale: if a
group contains *only* 'sticky' clients, it should be skipped while
cycling through groups.  Apply similar logic to the group menu.

Based on an idea from phessler@, who also tested another version.
2014-09-17 14:31:37 +00:00
okan
d27fc99784 fold in 'active' into 'flags' 2014-09-10 20:30:38 +00:00
okan
aac16013d2 name the group client queue appropriately, like other queues 2014-09-08 21:15:14 +00:00
okan
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
okan
a7f3f29ea9 Now that a group knows its screen, only pass down the group_ctx. 2014-09-08 13:51:29 +00:00
okan
5b46f0f7d8 Add screen_ctx to group_ctx, and populate on init. 2014-09-07 20:57:26 +00:00
okan
be091b3523 screen_fromroot -> screen_find 2014-09-07 17:38:38 +00:00
okan
78e0f21225 Get rid of a redundant array of groups per screen; we already have a
link to the group queue for each screen.
2014-09-07 17:27:20 +00:00
okan
5cd4cce3a0 Move termpath and lockpath into cmdq; side effect is that 'lock' and
'term' now show up in the application menu.
2014-09-06 16:14:35 +00:00
okan
142f52a0aa Rework group names: stash the group name inside the group_ctx as opposed
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-09-06 16:08:58 +00:00
okan
becc7f260c Merge group_menu into mousefunc_menu_group. 2014-09-01 18:04:58 +00:00
okan
3b99d53576 Since the flatting out of sc->group_names is only for setting
NET_DESKTOP_NAMES, merge the helper into xu_ewmh_net_desktop_names,
where we actually set the property.
2014-08-25 14:31:22 +00:00
okan
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
okan
9f36d4af35 gc->hidden has never consistently kept track of a group's state;
group_show() and group_hide() are not the only ways a group can change
state - if all clients in a group are either hidden or unhidden, then
that group's state should change, as well as the various EWMH ways.
Instead of trying to keep track in a wide variety of places, simply
query the clients in a group before needing to take action based on the
group's state.  Solves long standing confusion of when a group is hidden
or not.
2014-08-24 15:37:45 +00:00
okan
b31b09dfc2 Purely mechanical; unify 'num', 'no' and 'shortcut'. 2014-08-20 15:15:29 +00:00
okan
01cca3c114 Pull highstack from group_ctx (and useless calculations of); in the one
place that we use highstack, replace that usage with a local variable
(for now until stacking is done properly).
2014-08-19 12:47:51 +00:00
okan
1192007171 Get rid of nhidden in group_ctx; it actually never reported correctly
since nhidden wasn't incremented nor decremeted in all the right places,
thus confusing matters.  We don't need to carry a count around, so just
use a local variable in the one place we need one to supply
XRestackWindows().
2014-08-18 13:57:57 +00:00
okan
6798e3dde3 Make sure we cycle through existing client's group membership and set
the hidden state on the group; important to know group hidden state
after a re-exec or restart of cwm (as easily seen in group menu).
2014-02-08 02:49:30 +00:00
okan
f793964c9e Introduce a region queue and replace screen's XineramaScreenInfo; we
still use Xinerama to populate the regions per screen, but will switch
at a more appropriate time.
2014-02-03 21:07:47 +00:00
okan
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
okan
ad1b78c6d1 No need to store screen colormap and visual; rather just use the X
macros in the one place they are needed.
2014-02-02 16:29:04 +00:00
okan
0a71742af4 The menu already limits entries with MENU_MAXENTRY, so don't bother
holding a command name limit as well.
2014-02-02 15:46:05 +00:00
okan
cc1902f57c Switch ignoreq to winname struct since it's basically the same thing;
removes limit on name matching.
2014-01-30 22:17:22 +00:00
okan
fdefcecfa0 Move cwm_status around to avoid header fu, and remove extraneous signal
header from xevents.c; noticed by Christian Neukirchen.
2014-01-30 15:41:11 +00:00
okan
2be890489b Minimize trivial differences between a few kb and mb functions. 2014-01-29 22:30:00 +00:00
okan
db0b2fde5c 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
1f8f19b4d5 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
c28467cda5 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
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