Commit graph

1688 commits

Author SHA1 Message Date
Dana Jansens
98b021ff0c properly handle clients disappearing during delayed focus on them 2007-04-22 02:35:22 +00:00
Dana Jansens
5009498d59 use the timestamp from the original enter when delay-focusing a window 2007-04-22 02:34:05 +00:00
Dana Jansens
a5caab959c ignore crossing events while an interactive grab is going on.
when a menu is open, use the crossing events for the menu only.
2007-04-22 02:12:32 +00:00
Dana Jansens
05d1a86eff fix a segfault 2007-04-22 01:09:20 +00:00
Dana Jansens
b6897feb40 better event handling for menus 2007-04-22 00:53:21 +00:00
Dana Jansens
957963e272 1) get rid of menu titles
2) let separators have labels, when they have a label, then they will appear like a menu title used to

so if you want a menu title, you use a separator in the menu itself at the top

more style work may be needed
2007-04-22 00:36:54 +00:00
Dana Jansens
854b2ae684 grab enter/leave events during mouse grabs and pass events along still during the grab. this is needed to catch enter/leave events in the menus. it seems to not be weird with apps. 2007-04-22 00:35:36 +00:00
Dana Jansens
8644a47cb7 handle enter/leave events in the menu 2007-04-22 00:31:03 +00:00
Dana Jansens
78d7250098 add --debug-focus
add --config-file: to specify a config file to use.

set OPENBOX_RC property on the root window containing the path of the RC file being the full path to the RC file being used by openbox
2007-04-21 22:06:47 +00:00
Dana Jansens
8a972b3879 ignore BadMatch errors that can't be avoided 2007-04-21 21:36:02 +00:00
Dana Jansens
0e9bd66b75 fixes for transients
1) don't count non-normal windows as parents when placing/stacking transients
2) in stacking.c, when a window is transient for the group but has no parents, then don't loop forever looking for its parents
2007-04-21 21:32:21 +00:00
Dana Jansens
3f2d342de8 hide focus debugging messages 2007-04-21 21:04:35 +00:00
Dana Jansens
d713bdf462 remove the client_time_heap thing. actually its better to just use the user_time on the currently focused window I think. that will handle panels and things too. 2007-04-20 05:22:23 +00:00
Dana Jansens
90cd9c6219 get rid of global client_last_user_time variable.
add ObClientTimeHeap. This is a max-heap of the clients based on their user times. this only includes the clients whose user time is not CurrentTime. the maximum from this heap replaces the client_last_user_time variable, so that you always have the latest time, not the last time that was changed.

hoefully it works, so far it seems to.
2007-04-18 19:22:59 +00:00
Dana Jansens
f18d9a9539 don't allow comparison with timestamps to CurrentTime. it just doesn't make any sense.
(also client interface changed, that is in the next commit)
2007-04-18 19:21:14 +00:00
Dana Jansens
34196a1ef3 make stacking_add_nonintrusive work when there is only 1 other window 2007-04-18 19:19:45 +00:00
Dana Jansens
7f11e15bb8 fix undermouse placement 2007-04-18 17:18:16 +00:00
Dana Jansens
64dda2375e saved session information overrides per-app settings, because that's how you set it up in the session 2007-04-12 14:54:54 +00:00
Dana Jansens
33c469f453 set the desktop from per-app-settings properly, i think.
also fix a compiler warning.
2007-04-12 14:47:54 +00:00
Dana Jansens
7a1a6da849 better synthetic configurenotify handling. in particular..
http://bugzilla.gnome.org/show_bug.cgi?id=399552
on unmap, when we move the client window, we need to send a synthetic configurenotify.
2007-04-12 14:44:17 +00:00
Dana Jansens
ceaf23b6b4 set event_curtime if we're going to use it only 2007-04-12 02:26:58 +00:00
Dana Jansens
fda5ddfe16 excessive debug printing.. :) 2007-04-12 02:26:41 +00:00
Dana Jansens
c03c08415f don't fallback when a window is hidden right away, it's redundant, we'll get a focusout for the window after the unmapnotify anyways.
show new windows when switching desktops before hiding the old windows.
2007-04-12 02:26:26 +00:00
Dana Jansens
7059cde13b http://mail.gnome.org/archives/wm-spec-list/2006-May/msg00000.html
Send ConfigureNotify events when a window is mapped at the position it has specified. When we add decorations, the window gets moved in reference to the root window, so it needs to be told.
2007-04-05 03:59:24 +00:00
Dana Jansens
8d7cc2597e the centered menus thing got annoying :| 2007-03-30 18:29:28 +00:00
Dana Jansens
e6e9ab9224 unset DESKTOP_STARTUP_ID at startup so we don't pass it on unknowingly. 2007-03-30 16:18:25 +00:00
Mikael Magnusson
41c6b0486d delete the SN env var after launching a program 2007-03-30 09:57:21 +00:00
Dana Jansens
0eaf2d15e7 fully maximize windows all the time. size increments are preferred sizes not required ones.
-- http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.3
2007-03-30 04:37:53 +00:00
Dana Jansens
00ddaf06bb can't use (unsigned)-1 for a max time, because timestamps wraparound and stuff. user the last_user_time as a default for new windows instead. 2007-03-28 19:57:07 +00:00
Dana Jansens
6372bd7c0d use CurrentTime constant 2007-03-28 19:42:45 +00:00
Dana Jansens
2876f22088 use CurrentTime when time gets moved backwards 2007-03-28 19:41:41 +00:00
Mikael Magnusson
fc5b9a5612 fix compile without startup notification after r5711 2007-03-28 17:05:23 +00:00
Dana Jansens
f746a4975b use setenv to set up the DESKTOP_STARTUP_ID when launching programs.
before, if DESKTOP_STARTUP_ID was set in openbox, it would mess up adding it to the child's environment because it would appear twice. so now it will only appear once for the child always.
2007-03-28 06:00:19 +00:00
Dana Jansens
3ad050f7d8 proper logic for event_time_after, and wraparounds and such 2007-03-28 04:07:27 +00:00
Dana Jansens
5fb30e4488 add toggled-pressed and toggled-hover button states to themes. also rename toggled to be toggled-unpressed 2007-03-28 03:32:46 +00:00
Dana Jansens
33cc572402 drop some wasted client_validates. 2007-03-28 02:00:10 +00:00
Dana Jansens
d20f84f5de more handling time wraparounds 2007-03-28 01:53:37 +00:00
Dana Jansens
339d767044 handle time wrapping around. 2007-03-28 01:52:06 +00:00
Dana Jansens
0ec2282e2c make sure the ungrab happens after the grab. fracking X server doesn't have a monatomic clock.. 2007-03-28 01:11:40 +00:00
Dana Jansens
3278fdae73 open the menu with the mouse cursor just outside the top item 2007-03-25 17:32:58 +00:00
Dana Jansens
cbbda7a363 proper logic for using the menu overlap with middle centered submenus.
always center top level menus horizontally under the cursor. why is this not normal behavior..?
2007-03-25 17:26:22 +00:00
Dana Jansens
ee58f96a84 better placement for top level menus under the mouse cursor. middle placement is not used for this now. it was behaving differently than submenus so i'd like to have some consistency 2007-03-25 17:19:41 +00:00
Dana Jansens
afc015158a better vertical centering for when "middle" placement is enabled for menus 2007-03-25 17:16:32 +00:00
Dana Jansens
ede50bed27 return the old cursor. oops 2007-03-25 17:11:50 +00:00
Dana Jansens
c567f5937b add support for the X Cursor library. this means a nicer cursor for startup notification. 2007-03-25 16:56:47 +00:00
Dana Jansens
59c5d1cc4e set up the menu's parent and children stuff before rendering it 2007-03-25 16:38:04 +00:00
Dana Jansens
e6c82786ff don't menu menus jump around at all anymore. open them on screen in the first place 2007-03-25 16:34:26 +00:00
Dana Jansens
d6c45db8da bad idea.. more thought is needed.. 2007-03-25 15:16:00 +00:00
Dana Jansens
20f4d7fd44 when opening the client menu with a key, open it at the window's top left corner. is this clever or dumb? 2007-03-25 15:05:10 +00:00
Dana Jansens
eb2a0feb01 watch for reverttoparent reverting to the root window, which will create a DetailInferior focusin event on root.
adding some debug messages also which I am using..
2007-03-24 23:19:45 +00:00
Dana Jansens
4aa8d64f76 set the event_curtime when running an action to the time in the event used to run the action 2007-03-24 17:22:31 +00:00
Dana Jansens
c4732aeed2 2007-03-24 17:17:02 +00:00
Dana Jansens
e77353f0cd clean up the title getting function 2007-03-24 17:06:19 +00:00
Dana Jansens
4c2b16e72d kill window title numbering...
probably it was a dumb idea all along. you're not picking the numbers yourself and you're probably not remembering which window they apply to and the focus indicator thinger is much more clever than numbers
2007-03-24 17:01:40 +00:00
Dana Jansens
ba161e967b launch things on the desktop where you ran it.
also: kde apps move themselves to the current desktop when they open. what the heck?
2007-03-21 16:19:06 +00:00
Dana Jansens
c4446bebff ignore focus events on root that we don't care about 2007-03-21 16:12:21 +00:00
Dana Jansens
fd382fcc36 allow focus to disappear to black holes. (that is, windows not managed by openbox). the black hole may just be a window on another monitor. keyboard events aren't going to work in this scenario, though. 2007-03-21 15:54:30 +00:00
Dana Jansens
e227ac841e we're only getting one unmap notify now, with the new event mask on the root window. we're not getting one for the frame window anymore. 2007-03-20 04:42:25 +00:00
Dana Jansens
fb3d2033ba not passing timestamps sometimes and not others. set event_curtime when client messages provide a timestamp. 2007-03-19 17:59:16 +00:00
Dana Jansens
0ed1b678d1 memory leak in xinerama setup code 2007-03-18 15:16:03 +00:00
Dana Jansens
3678f8df8a use const char*'s when we should be 2007-03-18 15:07:30 +00:00
Dana Jansens
5fa443efc8 oops, logic error 2007-03-17 20:06:16 +00:00
Dana Jansens
50f631b9a7 mention when the logicalx/y is actually returned 2007-03-16 19:16:07 +00:00
Dana Jansens
73dac2b9b9 fix for bug introduced in revision 5643. logical size is supposed to be updated only when the window is resized. 2007-03-16 19:14:53 +00:00
Dana Jansens
f658ec961e animate presses on toggled titlebar buttons 2007-03-16 01:33:47 +00:00
Dana Jansens
6772ec19fc only refocus the omnipresent window if its allowed 2007-03-15 01:11:52 +00:00
Dana Jansens
34f5bbe4f6 clearer engrish 2007-03-15 01:09:10 +00:00
Dana Jansens
091e296a3d when an omnipresent window has focus and you switch desktops, keep it focused 2007-03-15 01:02:48 +00:00
Dana Jansens
83d987d9ab don't fall back focus to omnipresent windows 2007-03-14 21:15:58 +00:00
Dana Jansens
c80b496bf4 make focus_order into one long list instead of having one per desktop. this actually fixes bugs with omnipresent windows and adding desktops. it is just overall a little nicer i think.
also this is not tested. sorry if it breaks everything.
2007-03-14 21:07:30 +00:00
Dana Jansens
a9175a8a32 save the focus_client when falling back, so we don't actually refocus it when we don't want to. 2007-03-14 15:56:59 +00:00
Dana Jansens
adc5675823 oh, 2 things in this commit..
1) THIS ONE IS IMPORTANT: don't set client->iconfied if the window is not actually going to be allowed to iconify. heh!

2) changes to focus fallback to avoid crashing and to avoid losing focus all at the same time.
2007-03-14 15:51:21 +00:00
Mikael Magnusson
768ce7b456 move stuff around in client_unmanage to maybe make closing windows a bit nicer 2007-03-14 14:17:31 +00:00
Dana Jansens
5f7ffb00ba refix for managing iconic windows, without having the frame map which caused flashing.
instead, keep track of if the frame has been mapped yet. if it hasn't and it is getting hidden, then make sure to unmap the child.
2007-03-14 13:58:36 +00:00
Dana Jansens
e2521f5c64 a) fix resizerelative moving windows when they reach their minimum size do this by...
b) adding a function to let you see what size/position a window will be given when you actually try move/resize it to some given values. (client_try_configure)
2007-03-14 03:45:56 +00:00
Dana Jansens
2d03d09577 make frame and client window in a consistant mapped state when the window is grabbed 2007-03-14 02:23:50 +00:00
Dana Jansens
594648729f less wasted updates of wm_state 2007-03-14 02:07:30 +00:00
Mikael Magnusson
ebbcacae15 focus fallback 2007-03-14 01:17:39 +00:00
Mikael Magnusson
53109b7592 comparing strings to random locations in memory is probably not what we wanted to do 2007-03-13 12:34:58 +00:00
Dana Jansens
a9910e520b always unfocus the window when it disappears, no special cases.. (except unmanage) 2007-03-13 04:15:25 +00:00
Dana Jansens
270a5b25df set IconicState on windows that are not visible always. this means windows on other desktops too.
as well, this turned out to be a nice cleanup of the wmstate code.

regards to the random dude in #openbox complaining about the ICCCM to make me think to look this up and see if openbox was compliant.
2007-03-13 04:04:13 +00:00
Dana Jansens
7f58bd9eaa save and restore pre-maximized/fullscreen sizes properly
much cleanup on how per-app settings are applied to new mapping windows. maybe i broke it? but it'll be much quicker now, and it's consistant with the rest of the code, so hooray for that. pls let me know if i broke any of it :( hee..
2007-03-13 02:29:08 +00:00
Dana Jansens
b2e08c0ad5 remove event_lastttime. use CurrentTime when handling events without a timestamp in them 2007-03-12 23:23:39 +00:00
Dana Jansens
d47c6a0979 fallback is still getting x errors. instead, fallback when the client iconifies, and don't fallback when nothing has focus, send it to where we can control things though. 2007-03-12 17:31:11 +00:00
Dana Jansens
dc41c78a90 focusins can occur on windows that aren't clients when there's latency involved. wm_torture proved this point. fallback in that situation. also fallback when nothing is focused. 2007-03-12 06:09:02 +00:00
Dana Jansens
85a1a0cfb3 don't validate inside client_focus. instead, validate before you call it! 2007-03-12 06:04:00 +00:00
Dana Jansens
6b7cc88c9d validate clients before trying to focus them in fallback
also validate before trying to set the focus on a window

this should fix those crashes, and should just be better over all
2007-03-12 05:57:30 +00:00
Dana Jansens
3a33642be4 update focus_hilite appropriately for when changing desktops 2007-03-12 05:44:16 +00:00
Dana Jansens
c018e21220 i rewrote handling of focus events. this is pretty much based on blackbox's current form, as well as reading the xlib programming manual at:
http://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html

this may break for people. that'd be nice to hear about, so it can be fixed. but hopefully this is more robust. it sure is a lot more simple.
2007-03-12 05:25:34 +00:00
Dana Jansens
310ea89e0e another silly bug. i rule the school. 2007-03-12 03:09:09 +00:00
Dana Jansens
9ca0554507 that was a silly mistake. fullscreen windows amongst others will not crash now :D 2007-03-12 03:07:00 +00:00
Dana Jansens
52176d1485 roll back focus fallback change, so it behaves well with new stacking 2007-03-12 02:41:34 +00:00
Dana Jansens
d113b9f33f ok this is from prevous changes but has a bunch of debug stuff in it 2007-03-12 02:34:34 +00:00
Dana Jansens
2244bc036a remove the group option for the restacking commands in rc.xml, cuz groups are clever now 2007-03-12 02:27:58 +00:00
Dana Jansens
d33f44cd86 Rewrite the stacking code. It's a lot faster now, I should think. It's def a more clever algorithm. It deals with group transients much better.
On that note, utility and menu and toolbar window types are now treated as group transients in terms of stacking and focus and such.
2007-03-12 02:24:40 +00:00
Mikael Magnusson
bf247215bb no separator at the start of the menu 2007-03-12 02:12:51 +00:00
Mikael Magnusson
baa4a878cd make the combined client list menu not suck quite as bad 2007-03-12 01:59:49 +00:00
Mikael Magnusson
fa122a3092 update copyright notice in --version output 2007-03-12 01:12:31 +00:00
Dana Jansens
e2b3a32aed We were grabbing SubstructureNotifyMask on the root window. I don't know why.. It meant that we got unmap notifies for windows we weren't even managing and stuff. It ended up breaking VLC when it mapped-unmapped-mapped a window. We grab StructureNotify for all the clients, so I am not sure why this was ever there. 2007-03-11 22:16:42 +00:00
Dana Jansens
cbfa27759d extra braces.. why does the world hate me so? 2007-03-11 19:27:44 +00:00