Commit Graph

39 Commits

Author SHA1 Message Date
oga
0f0542ace1 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!
2008-09-22 14:15:03 +00:00
okan
45606f7a0d move client_vertmaximize to a more sensible location, purely for readability.
"don't mind at all" oga@
2008-07-15 22:12:09 +00:00
okan
d995c0ea4d save an X call and use what we already have stored.
ok oga@
2008-07-15 22:06:48 +00:00
okan
37abf72424 don't compensate for bwidth twice.
ok oga@
2008-07-15 13:52:02 +00:00
okan
de181a1c1f we already have ymax, so use it instead of asking X for it again.
ok oga@
2008-07-11 14:23:30 +00:00
okan
cfb9c394cb spacing, declaration lineup to be consistent throughout cwm,
readability, and a bit of knf.

ok oga@
2008-07-11 14:21:28 +00:00
okan
9280b8fb5b only cycle through visible *and* non-ignored windows.
ok oga@
2008-06-30 17:52:37 +00:00
oga
5c700f8601 Actually grab the correct mouse buttons for a window, instead of doing the
old hardcoded ones (which now can be wrong).

tested by todd@ and johan@.
2008-06-25 22:37:29 +00:00
oga
2ece6ad4cf No need to map/unmap the window on hide/show since we already do the
same to its parent.

"makes sense" okan@.
2008-06-18 20:42:29 +00:00
okan
b3cbe6ba11 (mostly) proper xshape event support
ok oga@
2008-06-14 22:04:11 +00:00
okan
0d911cac19 re-work client_placecalc()
- make sure new clients sit inside the current screen
- respect 'gap' placement on new clients

ok oga@
2008-06-12 04:59:51 +00:00
okan
ddd8d269ff make sure to take bwdith into account when placing a new window.
ok oga@
2008-05-23 18:57:35 +00:00
oga
ca512ce795 Pull out the behaviour in grab_label and search_start into one utility
function menu_filter(). The plan is to eventually merge in grab_menu too.
Shrinks the code a fair bit.

Also, change XMaskEvent for XWindowEvent to prevent getting exposes for other
windows. This is particuarly noticable on slow machines with a LOT of xterms
(todd, you're an odd man).

ok okan@, todd@.
2008-05-20 14:50:51 +00:00
okan
d07a7f737f client_cyclenext() -> client_cycle() since we now pass an arg.
removes a stray proto as well.

discussed with and ok oga@
2008-05-19 17:24:19 +00:00
oga
80fd601708 Use the XGrabKeyboard hack in for alt-tabbing as well. This stops the
mru getting the order messed up when gvim/xpdf et all steal key events.

While i'm here, change the logic in client_cyclenext() to use break instead
of goto, it's nicer that way.

Thirdly, instead of two different kbfuncs, just use the one and a flag.

"put your cycle diff in so I can pkg_delete gvim" okan@
2008-05-19 15:17:50 +00:00
okan
0a4376b166 finally implement keyboard binding for group toggling
idea for the
    "slightly-less-abhorrent-hack-but-a-hack-nonetheless-TM" from oga@

grab and ungrab the keyboard to get around some silly X apps that like
stealing events

ok oga@
2008-05-19 12:56:58 +00:00
okan
0e709156e6 remove extra calls to client_draw_border()
ok oga@
2008-05-18 20:00:16 +00:00
okan
662115e25e fix cwm's current XShape support from Edd Barrett -thanks.
XShape events should be handled at some point.

ok oga@
2008-05-17 03:59:54 +00:00
oga
4539521994 KNF, no binary change.
From Pierre Riteau. Thanks!
2008-05-15 22:18:00 +00:00
okan
6c44f202a4 tiny bit of knf
ok oga@
2008-05-15 21:56:21 +00:00
oga
519744a58e Rework the alt-tabbing code to be a lot simpler.
Diff mostly from Edd Barrett, with some minor changes from me.
Unfortunately the issue where apps like gvim and xpdf are stealing
keyrelease events causing the ordering to be messed up, but this is a
lot better. A fix for the aforementioned issue shall be forthcoming,
once a good one's been found.

ok okan@, also tested by todd@
2008-05-01 18:01:13 +00:00
oga
9aedc9e805 Remove screen_infomsg(), nothing uses it.
ok okan.
2008-04-16 13:35:37 +00:00
oga
26beb05af2 hit it with the knf stick. 2008-04-15 20:24:41 +00:00
oga
a101e9a0c8 Add "gap" support to .cwmrc. The options put in here make gaps on the edge
of the screen where an application won't be {,vert}maximized over. used for
placing a statusbar or something like xclock.

Patch from Edd Barrett, with input from myself and okan. Thanks!

ok okan@.
2008-04-15 18:46:58 +00:00
okan
3174a0bb47 remove alt-tab menu
discussed with a few

ok oga@
2008-04-09 18:10:47 +00:00
oga
da6f5be7c3 Fix a couple of issues with the maximization code.
If a window is vertically maximized, then resized, before the MAXIMIZED
flag wasn't removed, now it is. so doing a resize then does the right
thing.

Also, separate flags are needed for vertical and normal maximziation,
else when you do vertical-maximize, followed by maximize, the window
returns to it's original size.

ok simon@, okan@
2008-03-26 15:45:42 +00:00
oga
d8e2d259e2 Rip out, burn, and dance around the grave of group-edit mode.
I've yet to speak to anyone who uses it, so just kill it.

You can still add/remove from groups using the mouse binding.  Groups
may get a re-work sometime soon if i have a stroke of genius.

knocks about 4k off the i386 binary for me.

ok okan@, todd@.
2008-03-22 15:09:45 +00:00
oga
4685ce9dbc As mentioned in my last commit, there was an issue where the switching
code would always assume that the number of windows to switch to was
three if there were more windows hidden. Check for CLIENT_HIDDEN when we
count. Now it counts correctly.

ok simon@.
2008-03-19 00:18:28 +00:00
oga
78d222002b huge amount of cleanup and dead code removal.
full description of changes:
-remove fontlist, and all associated structures/calls, it's not needed.
 this also removes any doubt about leftover 9wm code (the list was
 borrowed from it). Since cwm now uses Xft for everything, the legacy
 font handling is just not needed.
-add /* FALLTHROUGH */ comments into grab_{label,menu}. I actually
 didn't intend grab_menu to be a fallthrough, but it actually works quite
 well there, so remove the extra rectangle drawing. I love it when that
 happens.
-remove a couple of unused prototypes that were obviously missed
 before.
-remove a bunch of commented out or if 0ed out code. It doesn't look to
 be coming back anytime soon.
-several functions returned an int, but this was never checked. most of
 them only failed if they failed to grab the pointer (thus the internal
 state didn't change), so just make them void and return early if this is
 the case.
-remove several unused functions and some useless variables.

knocks something like 200bytes off the stripped binary size for me.

ok marc@, tested by several others.
2008-01-16 11:39:20 +00:00
oga
1385b56548 - Remove the "all rights reserved" tag at the top of most of the source
files, and replace them with the actual ISC license.

- add license to the manpage (it was lacking before)

- correct license statement in the README

Permission given by Marius (copyright holder):
"1. please replace with the standard ISC license
2. you may add the ISC license to the man page
3. feel free to replace the information in the README as well"

and Dros (copyright holder for group.c):
"Please switch group.c to the ISC License."

ok ian@
2008-01-11 16:06:44 +00:00
marc
1545e483a5 Adjust initial window placement with any geometry that would place
the window at or over the right or bottom edge.
OK oda@
2008-01-03 20:20:20 +00:00
marc
296e93a651 Only use the x,y values from the XSizeHints structure when they are greater
than zero.   The fields are obsolete and not always used.
OK jasper@
2008-01-01 22:28:59 +00:00
jasper
8974a1ab8d When cycling, only the end of the window names will be printed if the
name is too long. so show the beginning instead.

from Pierre Riteau <pierre.riteau at free.fr>

"looks correct" matthieu@
2007-10-02 18:01:45 +00:00
jasper
9805442434 don't map hidden windows on re-start.
from aon@iki.fi
2007-06-08 16:29:19 +00:00
jasper
f1ac24d0ea make it possible to cycle through the windows when non are selected.
(eg. when they're hidden, now you can cycle through them)

from aon@iki.fi
2007-06-05 19:03:20 +00:00
jasper
4f2fd05371 show hidden windows when they should (eg. when the pointer is warped to them)
from aon@iki.fi via bernd@
2007-05-29 22:38:44 +00:00
jasper
a2e344b05f don't give borderless windows a border, when they're inactive
from aon@iki.fi via bernd@
2007-05-29 22:35:04 +00:00
jasper
857d1a8dab convert globals from G_foo to Foo, as per TODO.
"looks good" pedro@, ok matthieu@
2007-05-28 18:34:27 +00:00
bernd
1d12f3d8c4 Initial import of cwm-3.
tested by sturm@, ok matthieu@
2007-04-27 17:58:48 +00:00