09d88f4a18
Instead of having a function that just calls TAILQ_INIT on a global, use TAILQ_HEAD_INITIALIZER() and drop the function.
oga
2009-08-24 21:22:48 +00:00
e7f0d63413
instead of checking for flags in the client context, then removing them. e.g.:
oga
2009-08-24 17:04:39 +00:00
82911249e2
remove unnecessary Ar macros
okan
2009-08-08 17:27:51 +00:00
e095e955a8
remove unnecessary Dq macro; based on a diff from Martin Toft
okan
2009-08-08 00:25:52 +00:00
590eb4f37b
use fnmatch to glob the entries in the exec menu.
oga
2009-06-26 12:45:12 +00:00
f44862be9c
static local functions and data; almost identical diff from Thomas Pfaff
okan
2009-06-26 12:21:58 +00:00
b13d592c57
tidy up startup/init routines
okan
2009-06-23 21:52:38 +00:00
bcc0f73bb6
compact a bit by condensing a few if-else's; from Thomas Pfaff
okan
2009-06-20 00:55:41 +00:00
58d12134b1
unroll XCALLOC/XMALLOC macros; since we use xcalloc/xmalloc all over the place anyway, this makes things a bit more consistent; from Thomas Pfaff
okan
2009-06-20 00:22:39 +00:00
ee59e4a5a1
`exec'' and `ssh'' are lowercase.
sobrado
2009-06-19 10:43:49 +00:00
055b244bb4
items on the first list should have full stops too.
sobrado
2009-06-18 20:44:40 +00:00
71ad069846
the on-line manual should use the same notation for key bindings as the configuration file, this way writing configuration files is easier; add a few missing interactive command (.Ic) macros to key bindings; slightly improve spacing in the lists; other tweaks.
sobrado
2009-06-18 20:24:54 +00:00
11b4b7fec6
remove unnecessary casts; from Thomas Pfaff
okan
2009-06-17 13:08:37 +00:00
61f841ea58
re-factor parts of mouse move/resize bit to shrink and make more readable; no behavior change
okan
2009-06-17 12:45:01 +00:00
d7589ca80b
move like defines to a central, logical location; no binary change.
okan
2009-06-17 12:30:17 +00:00
3eec3b3802
'no' is the answer to the comment question: cc->name can't be NULL at this point due to client_setname()'s work; remove this check.
okan
2009-05-30 00:30:27 +00:00
d1b84c5415
re-order a bit for readability.
okan
2009-05-30 00:30:17 +00:00
6e9fa7548b
revert the 1.4 change - causes a double free noticed by grange@ a while ago while using kazehakase (or clients that don't set a name).
okan
2009-05-30 00:29:08 +00:00
8bbc376fd9
In movetogroup, check the window's current group and skip client_hide() if it's the same as the active group. Was in my original movetogroup diff, but it got simplified a little too far. ok oga@
sthen
2009-05-19 12:49:37 +00:00
2c29a1de65
nuke the leading underscore notation for local static functions - there are far better ways to know.
okan
2009-05-18 00:23:35 +00:00
d2cfeb40b4
oops, we appear to have grown an extra prototype for group_only(), get the secateurs out.
oga
2009-05-18 00:17:46 +00:00
382662d003
Rip out the event layer and just use a static array of callbacks like every other window manager since twm.
oga
2009-05-18 00:14:19 +00:00
9be7726606
redraw all borders at once on reload
okan
2009-05-17 23:54:17 +00:00
4d5dc5d9ea
a long time coming - re-work the way we deal with colors: since we're using Xft(3), use it to select the font color as well instead of trying to build one; properly allocate and free colors at-will, e.g. we now have configurable colors.
okan
2009-05-17 23:40:57 +00:00
5d51c8e0e5
minor bit of knf, just to be consistent; oga@ doesn't mind that much
okan
2009-05-17 23:37:52 +00:00
eb7803269e
add a "movetogroup" function, which hides the current window from display and moves it to another group. useful with the recently added "grouponly" function, giving the ability to use groups as simple virtual desktops (similar to e.g. xmonad, dwm and scrotwm).
sthen
2009-05-17 17:04:59 +00:00
6df7cba24e
redraw the border when unhiding a client window. fixes the situation where you change to a different group and the mouse isn't over a window; previously the border of the previously active window was highlighted but it didn't actually have focus.
sthen
2009-05-17 16:51:43 +00:00
64f0038db7
no need to use the global here.
okan
2009-05-04 19:13:33 +00:00
4f34392258
properly document menu_unhide; tweak a patch from rgouveia@cosmico.net - thanks.
okan
2009-05-04 18:05:21 +00:00
655c33c489
fix the other 50% of xrandr cases; reported by sthen@
okan
2009-05-01 17:50:20 +00:00
cc68490fe1
don't sync more than 60 times per sec on resize and move; idea from scrotwm.
okan
2009-04-15 14:10:07 +00:00
ea96e92ac8
properly teardown X connection upon quit; static a few while here, requested by oga@
okan
2009-04-15 14:01:45 +00:00
8a490fc270
we include sys/param.h, so remove sys/types.h; sort while here.
okan
2009-04-12 23:51:10 +00:00
8346de997f
- avoid shadowed Mask declaration in menu_filter - make _xev_reincorporate static evmask naming oga@, input okan@. ok okan@, oga@
martynas
2009-03-28 16:38:54 +00:00
17ae65adc5
add 'moveamount' to cwmrc; it sets keyboard movement amount, making it more useful on large screens manpage tweak & ok jmc@ ok okan@, oga@
martynas
2009-02-07 21:07:00 +00:00
507b65a27f
remove leftover from mdoc.samples; ok jmc@
martynas
2009-02-07 16:59:11 +00:00
4fe12f528c
fix off-by-one in geom.[xy], after pwin changes. keyboard movement to the rightmost or bottommost corners would confuse cwm: - there's no way to get the window back - tab cycling breaks ok okan@, oga@
martynas
2009-02-03 22:20:31 +00:00
6ad198022b
remove Nscreens and x_screenname() - we really don't need them.
okan
2009-01-27 02:16:20 +00:00
c750462d13
One of the most annoying things to do was restart cwm and lose all of your group state. Fix this up by using an X Atom (_CWM_GRP) to store the name of the group that we're using (the name, not the number is because at one point we may make the group numbers dynamic). I've been talking about this since c2k8. so CM-w means you keep all of your windows grouped properly.
oga
2009-01-27 00:42:53 +00:00
9203c7e8ca
passing a null pointer to free() is valid; sprinkle a few free->xfree.
okan
2009-01-23 20:47:45 +00:00
01af04a342
Switch to using XInternAtoms for caching the atom numbers. Saves a pile of function calls and server roundtrips.
oga
2009-01-23 20:04:30 +00:00
7660bf0db0
move conf_clear() and add proto.
okan
2009-01-23 19:00:59 +00:00
779177a53d
Move the keybinding argument to a union to prevent warnings where sizeof(int) != sizeof(void *). This has been annoying me for ages.
oga
2009-01-23 18:58:40 +00:00
87964e5c7e
now that pwin is gone gone gone, we no longer have to do the bwidth dance; xevents now able to deal with a border being set (which fixes those annoying movie-watching apps).
okan
2009-01-22 19:01:56 +00:00
e239976078
The default font name is strduped, so don't test for default font name (therefore leaking it) when cleaning up a conf struct.
oga
2009-01-22 18:16:38 +00:00
712f3f62c7
Oops, missed an atom.
oga
2009-01-22 18:06:16 +00:00
e2f3810fe8
Cache all of the X atoms we use at startup.
oga
2009-01-22 15:26:33 +00:00
1b269199c1
borderwidth as a cwmrc(5) keyword, really helps debugging from okan@ ok oga@
todd
2009-01-21 15:04:38 +00:00
0548673f2f
library dependency ordering matters for static archs, -lXext last in this case from matthieu@, verified on vax
todd
2009-01-19 20:23:19 +00:00
fa87ef4a9e
Finally fix the really annoying race where if you rapidly switch groups several times you'd end up losing clients (thinking they had gone away).
oga
2009-01-17 18:41:50 +00:00
399253a4ff
revert just the 'race fix'; more works needs to be ironed out with events and state.
okan
2009-01-16 16:49:17 +00:00
ec8e6052ba
remove pwin, bringing us to one client, one window. we no longer have to push attributes around, so things get a lot simplier, while fixing a few issues in the meantime; original suggestion by Edd Barrett many many moons ago.
okan
2009-01-16 15:24:14 +00:00
5c757cc7f4
On startup, don't leak memory when we enumerate existing windows.
oga
2009-01-15 17:23:12 +00:00
49e218cf53
- add missing prototypes. - properly name, place and static private functions. - move function which finds the xinerama screen for a coordinate to a more appropriate place while altering its semantics to match others. - tiny bit of style.
okan
2009-01-15 00:32:35 +00:00
7e110f379b
better cast; noticed by ray@
okan
2009-01-13 15:25:43 +00:00
c07123ec78
Add -Wall to CFLAGS, it's helped find a few dodgy constructs.
oga
2009-01-11 21:48:27 +00:00
d1050afb60
shortcut_to_name should not be defined as static in a header file. Put it in group.c where it it used most, and add an extern definition for the other users of it.
oga
2009-01-11 21:46:48 +00:00
0aca400461
better comparison idiom; found with -Wall
okan
2009-01-11 21:33:45 +00:00
590169ce24
- merge grab_sweep() into mousefunc_window_resize(). - merge grab_drag() into mousefunc_window_move(). - properly name, proto and static private functions. - since we already do XMoveResizeWindow() and XMoveWindow() in (now) mousefunc_window_resize() and mousefunc_window_move() respectively, client_resize() and client_move() calls are unnecessary.
okan
2009-01-11 18:34:46 +00:00
b523788c0e
If the mousebutton is unknown when we go to grab, don't just print a warning, but also skip the XGrabButton call. Noticed by code inspection by okan@, but we agreed my fix was cleaner.
oga
2009-01-08 21:35:19 +00:00
ee0ec9a453
remove "search should ignore the current window" from list, for the current behavior is better...
okan
2009-01-06 00:41:09 +00:00
d2a54bc115
HasXinerama is an int
okan
2009-01-06 00:19:55 +00:00
25af744559
Kill obviously dead variable.
oga
2008-12-04 23:55:04 +00:00
be5dfb4ea4
Don't ignore sigpipe. Everytime cwm forks it execs anyway (so it shouldn't get that signal), and this causes problems for our children since they inherit the ignore.
oga
2008-12-03 23:55:46 +00:00
a0739c6cd4
Xinerama and XRandR dual head support for cwm(1). Now we detect the xrandr reconfiguration events and change our sizes depending on that. We also detect the xinerama screens for maximize, vertmaximize and initial window placement.
oga
2008-09-29 23:16:46 +00:00
e2610449d1
.Bl needs a matching .El. From Martin Toft a while ago, thanks!
oga
2008-09-22 14:37:12 +00:00
2bd5e53c2e
Improve wording of the ``ignore'' directive. From Martin Toft a while ago, ok okan@ from similar amount of time ago.
oga
2008-09-22 14:35:16 +00:00
60a88f54cc
*sigh* Revert the diff that wasn't meant to go in yet.
oga
2008-09-22 14:28:04 +00:00
61601991b5
Display the current window title not a previous one in the case of ``show all'' in the window search dialogue. Noticed and diff from Tim van der Molen, thanks!
oga
2008-09-22 14:15:03 +00:00
a0082c58a4
Keep the exec menu entries sorted. Go for it okan@
canacar
2008-09-03 04:39:12 +00:00
04441482d4
fix the froggy problem.
oga
2008-07-22 21:01:54 +00:00
0df9e0673c
We've been handling grabbing wrong all this time (noticed at c2k8).
oga
2008-07-22 20:51:54 +00:00
436a9e5c54
split x_setup() into two. dpy_init() for setting up the display and checking the X config, and x_setup to set up the screens.
oga
2008-07-22 20:42:24 +00:00
20052e0248
Add xu_key_ungrab() and a mirror to xu_key_ungrab(). a couple of changes that are coming up depend on it.
oga
2008-07-22 20:26:12 +00:00
13b640ea29
Kill screen_init(). it's been stubbed out for a while now. I don't envision it coming back in it's current form.
oga
2008-07-22 19:54:57 +00:00
2f8639d37b
kill another leftover prototype.
oga
2008-07-22 19:52:54 +00:00
556f7a0871
Put back the initialisation of gc in group_cycle. No cookie for okan.
oga
2008-07-18 15:40:52 +00:00
2798cdc9a7
move client_vertmaximize to a more sensible location, purely for readability.
okan
2008-07-15 22:12:09 +00:00
8afabd6c55
save an X call and use what we already have stored.
okan
2008-07-15 22:06:48 +00:00
96f03c8cbc
don't compensate for bwidth twice.
okan
2008-07-15 13:52:02 +00:00
6d268bfa4a
Nm makes more sense than Xr, from Pierre Riteau - thanks!
okan
2008-07-11 22:43:44 +00:00
b6dab5ccf3
Change "a window" to "current window" in documentation. it's more correct.
oga
2008-07-11 15:42:29 +00:00
a556d3fa1f
add Xr for cwm(1)
okan
2008-07-11 15:20:04 +00:00
6ea4b1bd3b
no more hidden (and mysterious) config reloads and allow binding a key to a config reload; CMS-r by default.
okan
2008-07-11 15:18:29 +00:00
8be175b175
replace snprintf with strlcpy
okan
2008-07-11 14:24:34 +00:00
85e6c61360
we already have ymax, so use it instead of asking X for it again.
okan
2008-07-11 14:23:30 +00:00
b23fad3987
spacing, declaration lineup to be consistent throughout cwm, readability, and a bit of knf.
okan
2008-07-11 14:21:28 +00:00
734f45ab4b
only cycle through visible *and* non-ignored windows.
okan
2008-06-30 17:52:37 +00:00
993fd4311f
Allow a mouse binding to hide a window, and add a default keybinding for CMS-M3, so it's hard to press by accident, but there if you need it.
oga
2008-06-25 22:44:42 +00:00