about summary refs log tree commit diff
path: root/xevents.c
Commit message (Collapse)AuthorAgeFilesLines
* Rip out the event layer and just use a static array of callbacks likeoga2009-05-181-199/+74
| | | | | | | | | | every other window manager since twm. The event layer is very nice, very shiny, very flexible, and very much underutilised. We don't need any of those shiny features so it's probably better to earn ourselves 1k smaller text size instead. ok todd@, okan@
* fix the other 50% of xrandr cases; reported by sthen@okan2009-05-011-8/+10
| | | | "commit that" oga@, ok sthen@
* - avoid shadowed Mask declaration in menu_filtermartynas2009-03-281-1/+1
| | | | | - make _xev_reincorporate static evmask naming oga@, input okan@. ok okan@, oga@
* Move the keybinding argument to a union to prevent warnings whereoga2009-01-231-1/+1
| | | | | | sizeof(int) != sizeof(void *). This has been annoying me for ages. ok okan@, todd@
* now that pwin is gone gone gone, we no longer have to do the bwidthokan2009-01-221-8/+9
| | | | | | | dance; xevents now able to deal with a border being set (which fixes those annoying movie-watching apps). ok todd@, oga@
* remove unusedokan2009-01-171-11/+1
| | | | ok oga@
* Finally fix the really annoying race where if you rapidly switch groups severaloga2009-01-171-14/+21
| | | | | | | | | | | | | | | | | | | | | | times you'd end up losing clients (thinking they had gone away). From the ICCCM (which should not be read without a stiff drink in hand, I made this mistake so you don't have to): to request a window to be withdrawn one should send a synthetic UnmapRequest event when iconified. To request iconification one should just unmap the window. The ICCM further recommends that the synthetic event should just be taken as a cue to withdraw, to deal with legacy clients. Taking a hint from this, rework xev_handle_unmaprequest to correctly detect these situations. A Withdrawn window may come back anywhere, even as a subwindow of something else, so the correct way to handle this state is to forget it ever existed. While i'm here, kill a dumb attempt to notice this in client_delete, and nuke the very unnecessary arguments. Todd confirmed this fixes the `race'. ok todd@, ok ok okan@
* revert just the 'race fix'; more works needs to be ironed out withokan2009-01-161-1/+1
| | | | | | events and state. agreed by oga
* remove pwin, bringing us to one client, one window. we no longer haveokan2009-01-161-35/+16
| | | | | | | | | | | | 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. annoying window placement and race, found in c2k8 by todd, fix by oga! lots of feedback from todd and oga - thanks! "commit that bad boy" oga@
* remove unused variablesokan2009-01-111-1/+0
| | | | ok oga@
* remove unused codeokan2009-01-061-2/+0
| | | | ok oga@
* Kill obviously dead variable.oga2008-12-041-2/+1
|
* Xinerama and XRandR dual head support for cwm(1). Now we detect the xrandroga2008-09-291-0/+18
| | | | | | | | | | | reconfiguration events and change our sizes depending on that. We also detect the xinerama screens for maximize, vertmaximize and initial window placement. This could be improved by automatically resizing maximized windows when the screen resolution changes and by moving windows that would be hidden into visible space. Said changes will come shortly. Tested by many. matthieu@ didn't oppose.
* *sigh* Revert the diff that wasn't meant to go in yet.oga2008-09-221-18/+0
| | | | | note to self: When you mean to type cvs commit search.c, don't forget the filename.
* Display the current window title not a previous one in the case ofoga2008-09-221-0/+18
| | | | | ``show all'' in the window search dialogue. Noticed and diff from Tim van der Molen, thanks!
* fix the froggy problem.oga2008-07-221-0/+21
| | | | | | | | | | | | Implement a handler for the MappingEvent, meaning that the keymap has changed. When this happens, ungrab all bindings, update the map, and regrab. Fixes the problem where some keybindings wouldn't work under non us or uk keymaps (especially the .fr map, it seems). Issue noticed by ajacoutot@, ratchov@, and a few people on misc. Based on an initial diff from ratchov@. ok okan.
* spacing, declaration lineup to be consistent throughout cwm,okan2008-07-111-45/+52
| | | | | | readability, and a bit of knf. ok oga@
* Revert previous "fix" it introduces new issues of its own.oga2008-06-181-1/+1
| | | | | | | The problem that's causing us to lose windows is that rapid hiding and unhiding causes a backlog of X events, so we lose track of client state, and delete cc->pwin when we should not. A proper fix will arrive when it's been worked out.
* Ignore caps lock and numlock for keyboard bindings. The way Xlib makesoga2008-06-171-0/+6
| | | | | | | | | you do this is ugly. Also remove mod2 (numlock) and mod3 (odd) from the list of keybinding modifiers. They don't make much sense here. based on a heavily modified diff from Martynas. ok okan.
* Just rework the mouse binding calculation on event to look like theoga2008-06-171-15/+13
| | | | | | | | kbfunc one. Makes the code a lot easier to read. Fixes a bug i introduced in the last commit here. ok okan.
* The mousebinding code missing a break once it had found the correctoga2008-06-171-16/+17
| | | | | | | | | binding, this expose another issue that's still being debugged. Issue pointed out by Dan Harnett, thanks! While i'm here KNF and rework the logic to not be ass-backwards. ok okan.
* (mostly) proper xshape event supportokan2008-06-141-3/+16
| | | | ok oga@
* confable menu and window mouse bindings from rivo nurges (thanks!) withokan2008-06-141-96/+13
| | | | | | some minor fixups, man page bits and knf. ok oga@
* Don't client_delete() on an Unmap event, only do that on a client delete event.oga2008-06-131-14/+2
| | | | | | | | | | found by (among others) todd@ when you have a lot of clients and do something that maps and umaps a lot of windows fast. Debugged with aid of gdb, todd, okan and NULL pointers in a pizza place in edmonton while waiting an inordinately long time for food. ok okan@, todd@
* ignore if non-zero expose events, for we could be covered by multipleokan2008-06-121-1/+1
| | | | | | windows; merely an optimization. ok oga@
* Make menu_filter handle mouse movement too. This enables the keyboardoga2008-05-211-1/+1
| | | | | | | | | | search dialogues to be manipulated with the mouse, too. It also allows me to shrink the codebase further by killing grab_menu(). One known issue with highlighting the first entry in a search dialogue, that'll be fixed soonish. ok okan@, tested by Edd Barrett and todd@.
* finally implement keyboard binding for group togglingokan2008-05-191-0/+6
| | | | | | | | | | 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@
* send the correct x/y coordinates to XConfigureWindow()okan2008-05-181-2/+2
| | | | | | fixes some windows that seem as if they don't fit; noticed by Edd Barrett. ok oga@
* KNF, no binary change.oga2008-05-151-2/+2
| | | | From Pierre Riteau. Thanks!
* Remove screen_infomsg(), nothing uses it.oga2008-04-161-1/+0
| | | | ok okan.
* hit it with the knf stick.oga2008-04-151-20/+19
|
* Make _xev_quit "volatile sig_atomic_t" for proper correctness.simon2008-04-081-1/+1
| | | | Noticed by oga@, thanks!
* Add quit function, bind it per default to CM-q and change exec_wmsimon2008-04-071-1/+2
| | | | | | | | | binding to CM-w. Inital diff from Gleydson Soares Feedback from oga@ and okan@ ok oga@
* Replace the symlink configuration scheme with a simple yacc parser assimon2008-03-231-4/+1
| | | | | | | | | found in other places of the tree. Remove sticky and font commandline options and add another one for alternative config locations. Split off cwmrc(5) from cwm(1), nuke #ifdef __OpenBSD__ while there. tested by various kind people, feedback from oga@ and okan@ - thanks! ok oga@, jasper@, okan@
* Rip out, burn, and dance around the grave of group-edit mode.oga2008-03-221-16/+4
| | | | | | | | | | | 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@.
* Remove a bunch of unused variables and incorrect comments.oga2008-03-221-1/+1
| | | | "ok with me" okan@.
* Typo: s/supression/suppressionoga2008-02-201-1/+1
| | | | from Pierre Riteau, thanks!
* huge amount of cleanup and dead code removal.oga2008-01-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* - Remove the "all rights reserved" tag at the top of most of the sourceoga2008-01-111-1/+12
| | | | | | | | | | | | | | | | | | 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@
* convert globals from G_foo to Foo, as per TODO.jasper2007-05-281-21/+21
| | | | "looks good" pedro@, ok matthieu@
* Initial revisionbernd2007-04-271-0/+603