Commit graph

494 commits

Author SHA1 Message Date
Dana Jansens
7229bea3c6 client_configure_full is trying to move a window, it shouldn't determine the window's monitor from its current position, but from the new position instead. move client_monitor()'s logic into screen, more generically, and let client_configure_full use that 2007-03-11 17:34:07 +00:00
Dana Jansens
62a39c4c70 stacking has been made more reliable with groups and group transients.
this was a pretty invasive change in client.c though, so it may break things?

it did expose some bugginess in client_calc_layer, which is now better than ever, hopefully there isn't more to be found.
2007-03-11 16:58:19 +00:00
Dana Jansens
2c98204dfe make _NET_ACTIVE_WINDOW requests look at the timestamp when the user didn't
request it
2007-03-11 14:17:14 +00:00
Dana Jansens
19b480058e wow... this is a big commit...
all related to _NET_WM_USER_TIME and focus stealing prevention

a) add launcher startup notification. this means when you run something from
   the openbox menu or a key/mouse binding, that startup notification will go
   on in openbox and other applications like your panel or something
b) add the _NET_WM_USER_TIME property for windows
c) use the _NET_WM_USER_TIME data and startup notification to prevent focus
   stealing.
d) cookie party !! ! all are invited.
e) oh yeah, and pass around timestamps for a lot more things. like, when you
   run an action, send the timestamp for the event that is running the action.
   this is important for startup notification. this also affects menus.
f) yes.. cookies..

would it be a good idea to disable focus stealing prevention if a window takes
too long to load? i mean.. maybe after a certain length of time, a user can't be
expected to not do anything in any other windows, but would they still want the
new application to focus then? HMM. open question i guess..
2007-03-11 04:44:15 +00:00
Dana Jansens
9d6e390765 add the _NET_WM_USER_TIME property support. When focus_new is enabled, don't focus new windows if the user is doing something in another window since it launched. If we can tell when it launched, either from the _NET_WM_USER_TIME or from startup notification. 2007-03-11 02:06:34 +00:00
Dana Jansens
bd19fd06db remove the kde icon hint, they use the EWMH icon now 2007-03-11 00:59:13 +00:00
Dana Jansens
f6265e82e6 1) Remove support for the Urgent hint. This will no longer do anything within Openbox
2) Add support for _NET_WM_STATE_DEMANDS_ATTENTION. Yay!
2007-03-10 23:57:33 +00:00
Dana Jansens
ec67e96583 make startup notification a little more robust. obconf is just broken, between
the application and it's .desktop.
2007-03-10 22:52:50 +00:00
Dana Jansens
49dd40d99f no longer honor transient_for = None or Root. it violates the ICCCM and is causing problems. there are proper ways to make group transient windows with the EWMH. 2007-03-10 20:52:04 +00:00
Dana Jansens
4fa19b5985 more cleverness for window placing.
make sure its 10% on the screen in some direction always..

but if the application is placing itself, make sure its on the screen entirely,
and also put it entirely on one monitor if you have xinerama.

if it's bigger than the monitor's space though, it won't do anything with it..
2007-03-10 01:08:19 +00:00
Dana Jansens
ae246097a5 let you put windows with the titlebar off screen.. for mikachu.
but also don't let applications put themselves under the struts!
2007-03-10 00:44:43 +00:00
Dana Jansens
86b809df8a oops... I'm combining two different things in this commit... so I'll try be clear
1. when another wm requests to replace openbox, openbox exits. but the SM will just restart openbox unless we tell it not to. so now ob_exit_replace() will change the session manager's view of openbox to not restart it. that way the new WM will be able to run.

2. allow windows to move themselves off of the screen 90% of the way, if they really want to. but only 90% to the left, right, and bottom of the screen. it won't let the app move off the top of the screen on its own at all now, since hiding the titlebar on you without you being a part of the process is pretty darn evil!

this is really to address bug # 2982 - for the tilda application. but i guess if windows really want to move off the screen, who's to say no? also, every other window manager will let them - except metacity won't let them on the left/top side of the screen.
2007-03-04 09:01:52 +00:00
Dana Jansens
c07095acb7 better string matching for duplicate title numbering. this will check against the whole window's title. it used to check less than the full length sometimes. thanks to logan for patches and ideas! 2007-03-04 07:54:21 +00:00
Dana Jansens
65f0c70851 pretty brackets 2007-03-03 03:53:10 +00:00
Dana Jansens
4084f5d82d fix for per-application focus settings. properly use all the possible values (1, 0, and -1) 2007-03-02 22:44:38 +00:00
Dana Jansens
140c5313cf only update the screen areas when a window actually has a strut (or when the strut changes), don't waste extra calls to screen areas, because it makes people redraw when they don't need to 2007-03-02 15:19:39 +00:00
Dana Jansens
80a6f06c0a support clients which use true transparency 32-bit visuals.
this requires that when a client is using a 32-bit visual, we have to
make the frame windows that sit underneath it to use the same visual (and a
colormap which matches it)
2007-03-02 06:01:16 +00:00
Dana Jansens
78af5d15e9 this includes a number of things since my magnificent return....
1. some random compiling/style cleanups
2. some bigfixes
 - mislogic in per-window-settings and focusing new windows
 - use client_can_focus rather than checking variables for directional focus
 - MAYBE fix all those lock-ups forever. using event_curtime (a new variable) now instead of event_lasttime. event_lasttime is still used however when the event being processed did not have a time associated with it. this may or may not be a problem, and will be seen.
3. um.. i forget
4. oh yeah, 3rd party docks are now treated like the internal ob dock irt focus. that is, clicking on them won't pass them focus. this is going to be ratified as expected behavior in the wm-spec just now. if docks/panels want focus they can request it with _net_active_window, and then they can have all the focus they want! one day alt-tabbing around dock windows might be nice. but not until the ob dock is moved out into a separate application. going to have to add a wmapp selection and stuff for that though... ugly. who uses wmdockapps anymore !? someone must.. *sigh*
2007-03-02 02:23:00 +00:00
Mikael Magnusson
d3d4aa2987 80 cols 2006-11-15 21:12:06 +00:00
Mikael Magnusson
59d35252dd dont use nonexisting functions 2006-10-31 14:40:32 +00:00
Mikael Magnusson
b18846db69 Add MoveFromEdge* actions, shorten client_directional_edge_search with some handy #defines 2006-10-31 03:33:21 +00:00
Mikael Magnusson
b9532883a2 dont use the keepBorder option for mwm hinted windows after all, but do honor the mwm_decor_border hint instead 2006-09-12 20:26:00 +00:00
Mikael Magnusson
96eab1423f oops, added borders to windows when keepborder was on and they didnt have one to start with, ie docks etc 2006-08-31 13:43:19 +00:00
Mikael Magnusson
4d50b21835 update copyright step 1 2006-08-22 16:37:35 +00:00
Mikael Magnusson
c234ed9ecd maybe fix transients placed offscreen under certain conditions 2006-08-21 20:39:42 +00:00
Mikael Magnusson
d77c8f62f2 a more proper fix for the client list menu trying to activate a closed client, no difference on end result 2006-08-19 20:34:27 +00:00
Mikael Magnusson
3b56988069 dont flicker when setting desktop by per app settings 2006-08-19 17:55:31 +00:00
Mikael Magnusson
39f6b8ca71 forgot to check if perapp settings said to put window on all desktops 2006-08-19 17:50:12 +00:00
Mikael Magnusson
34269a34e1 lets not change the stacking before we add the window to the stacking stack 2006-08-19 15:35:23 +00:00
Mikael Magnusson
1de9c1901c fix a silly copy paste bug, titlenumber should now be disableable 2006-08-18 21:23:02 +00:00
Mikael Magnusson
83a0303dd7 add option titleNumber in theme section to disable the little [x] that you get after identical window titles 2006-08-16 19:32:13 +00:00
Mikael Magnusson
8eea64ca08 adjust logic to be... logical 2006-08-16 18:11:47 +00:00
Mikael Magnusson
5b288939ab try utf8 for WM_NAME if locale fails, really the _locale functions in prop.c are busted and should be fixed but i have no idea how. 2006-08-16 16:51:00 +00:00
Mikael Magnusson
dce6247e69 really fix focus_last? 2006-08-04 19:56:42 +00:00
Mikael Magnusson
97719044b1 s/_/./ 2006-08-02 17:40:23 +00:00
Mikael Magnusson
6a7c0b893a s/self/settings/ 2006-08-02 17:37:05 +00:00
Mikael Magnusson
05c0dbfedf be paranoid about programs setting 0 resize increments, which results in a divide by zero, which is in turn bad 2006-08-02 16:36:29 +00:00
Mikael Magnusson
d2fb93e8af remove bogus check for handle width in client_setup_decor_and_functions resulting in handles not being drawn if a theme with handle width = 0 is used when that function is called for a window and a theme with handle with > 0 is then loaded. 2006-08-02 06:07:12 +00:00
Mikael Magnusson
9fe211a1ca remove an old comment 2006-08-01 23:59:27 +00:00
Mikael Magnusson
e0aa54a891 rip out the VIDMODE extension stuff. this was only used to size fullscreen windows to the viewport, i doubt anyone is actually using it and it interacts very badly with xinerama. 2006-06-11 09:47:53 +00:00
Mikael Magnusson
0f80c6ab40 not surprisingly, there was a typo 2006-06-09 14:53:36 +00:00
Mikael Magnusson
e72a1232fa if this works i will be a bit amazed, add class matching, and allow to match either name or class or both 2006-06-09 14:52:06 +00:00
Mikael Magnusson
d4b7340454 changing props need client_change_state 2006-06-09 14:29:54 +00:00
Mikael Magnusson
94a0ea2150 fix2 2006-06-09 14:19:59 +00:00
Mikael Magnusson
2658610ae2 fix 2006-06-09 14:17:15 +00:00
Mikael Magnusson
ff04e2c9a9 add the rest of the possible states to per app settings, and fix some mem leaks in the code that _set_ the per app list 2006-06-09 14:14:17 +00:00
Mikael Magnusson
8af51d8a1b add role matching to per app settings and fix a small memleak in the code that frees the per app list 2006-06-09 12:47:48 +00:00
Mikael Magnusson
c63938f765 fix 2006-06-08 11:37:51 +00:00
Mikael Magnusson
de1559a094 move stuff around some more 2006-06-08 11:36:43 +00:00
Mikael Magnusson
f80ab241f3 some notes to self 2006-06-08 11:05:29 +00:00
Mikael Magnusson
ed61a94ca5 per app settings 2006-06-08 10:18:31 +00:00
Mikael Magnusson
ad215303e7 fix #2670 (hilight first entry in menus) and respect keepBorder setting when removing borders from mwm hints 2006-04-20 18:36:23 +00:00
Mikael Magnusson
1fad2da07f more 64 bit fixes 2005-10-07 17:00:35 +00:00
Mikael Magnusson
9df57ff1b5 I meant to check for windows placed by programs, not windows not placed by the user. Now checks for windows placed by programs and not placed by user. This excludes placement schemes which the former check didn't, resulting in some brokenness, particularly with xinerama. 2005-09-13 12:13:13 +00:00
Mikael Magnusson
829e746b4d fix programs showing their child windows outside the screen, but retain the possibility to put windows slightly offscreen with the -geometry argument (which is why i broke it in the first place) 2005-08-11 13:23:59 +00:00
Mikael Magnusson
03cad5d97c add a (temporary?) check to client_activate to make client_list_menu not crash openbox when selecting a window that has closed since the menu opened 2005-07-25 14:15:16 +00:00
Mikael Magnusson
6ec1881579 c++ comments 2005-07-14 13:23:05 +00:00
Mikael Magnusson
cab723fac9 fix transparent terminals not updating when toggledecoring them 2005-03-25 23:00:20 +00:00
Mikael Magnusson
e74fbdaa0e revert a commit xor made in 2003 that always annoyed me, now docks (panels) go in the same layers as normal windows again. docks that dont specify layer go in the ABOVE layer and those that specify BELOW get put in the NORMAL layer. 2005-02-06 16:00:24 +00:00
Mikael Magnusson
ac416fd27e testing failed, hopefully this is reverting to the right place 2005-02-06 02:18:06 +00:00
Mikael Magnusson
3f40d6e762 more testing 2005-02-06 02:06:57 +00:00
Mikael Magnusson
52c345c300 try moving the move_onscreen with the rude into the place routine so it only gets called if a window doesn't specify a position 2005-02-06 01:43:37 +00:00
Mikael Magnusson
60565bcba8 okay so that's why it didn't use move_onscreen 2005-02-06 01:16:00 +00:00
Mikael Magnusson
ef042d220b test some stuff 2005-02-06 00:50:43 +00:00
Mikael Magnusson
943dd68152 the xinerama patch from john russell, modified a bit and merged the move_onmonitor with the already existing move_onscreen stuff, not sure if it actually works on xinerama since i dont have it. 2005-02-05 23:26:16 +00:00
Mikael Magnusson
4f9ec4cbdb grab the mouse buttons and keyboards keys on clients before showing them to avoid the situation where a grabbed key goes to a client without being seen by openbox, hopefully has no side effects but probably does 2004-12-30 15:37:30 +00:00
Mikael Magnusson
349990a3b5 eek, a patch had a tab in it 2004-10-21 20:54:59 +00:00
Mikael Magnusson
f825b13b85 patch to let wmctrl and others set _NET_WM_STATE_HIDDEN to minimize windows, by Timo Hirvonen 2004-10-08 13:56:39 +00:00
Mikael Magnusson
c02f68499f option to make dragging and findedge ignore windows on lower layers 2004-09-04 19:45:38 +00:00
Mikael Magnusson
8ba619d5f1 finding edges and switching directional focus was broken from omnipresent windows. changed c->desktop to screen_desktop seems to work fine so far. 2004-06-14 12:26:35 +00:00
Mikael Magnusson
cabcea2002 okay, so maybe i should try compiling things. lets see if i can get away with not testing it 2004-03-31 07:40:06 +00:00
Mikael Magnusson
89f223e253 this is not so nice 2004-03-30 22:32:12 +00:00
Mikael Magnusson
a70e22c557 nothing to see here, move along 2004-03-30 22:24:15 +00:00
Mikael Magnusson
f870d32397 two hands raised, keepBorder added to <theme> section 2004-03-21 20:02:47 +00:00
Mikael Magnusson
b2b8ad92bf update copyright notices 2004-03-21 11:57:31 +00:00
Mikael Magnusson
3fadb639fa pasted that a bit too far down yesterday 2004-03-21 11:38:21 +00:00
Mikael Magnusson
335e8acbfc yay no tabs in the source 2004-03-21 01:03:00 +00:00
Mikael Magnusson
e3786e64fb typo fix a comment 2004-03-20 23:52:38 +00:00
Mikael Magnusson
07dd2c6442 fix reversed variable name and add a little comment to the magic menu code 2004-03-20 23:40:29 +00:00
Mikael Magnusson
cd0204d626 fullscreen overrides aspect hints (because i say so) 2004-03-20 21:38:04 +00:00
Mikael Magnusson
77c744f285 raise your hand if you liked the onepixel border and i'll add an option for it somewhere 2004-03-20 21:35:44 +00:00
Mikael Magnusson
2a8ede0004 alert windows can be titleless, maybe all titleless windows should be empty, i dunno 2004-03-20 21:34:29 +00:00
Mikael Magnusson
d50f491716 this might fix focusLast which was previously borken when closing a window and the pointer was on it and then going onto another from the close. er, yeah. 2004-02-25 19:07:40 +00:00
Dana Jansens
a6e4aba806 make all dialog typed windows transient for their group if they dont specify a WM_TRANSIENT_FOR hint. 2003-12-22 17:24:51 +00:00
Dana Jansens
5a1ad84c05 use gpointer for void* 2003-10-25 19:39:19 +00:00
Dana Jansens
16dc1c48c8 oops typo of doom 2003-10-25 19:30:48 +00:00
Dana Jansens
174de91c34 use g_[s]list_next/previous consistantly, and check for "it" instead of "it != NULL" consistantly. props to Logan again :) 2003-10-25 19:27:09 +00:00
Dana Jansens
5cac540f56 add to teh focus order before the call to change_state, since this can remove/add to the focus order, and then we're in there twice 2003-10-18 22:09:29 +00:00
Dana Jansens
5749f109f9 both must be normal to inherit above/below 2003-10-15 16:14:29 +00:00
Dana Jansens
c30df2e750 dont let clients be above and below 2003-10-15 05:50:56 +00:00
Dana Jansens
415f2cce27 only inherit layer when both windows are the same normal status 2003-10-15 04:56:32 +00:00
Dana Jansens
740c5b2a20 consistant glib type usage 2003-10-15 03:59:35 +00:00
Dana Jansens
c9233ddb23 unmap and map the client window when the frame is hidden/shown 2003-10-15 03:01:34 +00:00
Dana Jansens
37c9f2d961 fix _NET_WM_STRUT oldschool support 2003-10-14 07:23:42 +00:00
Dana Jansens
2bf58d8fb3 dont put windows below by default 2003-10-13 03:47:52 +00:00
Dana Jansens
420e6f87a6 inherit above/below more carefully 2003-10-13 02:52:59 +00:00
Dana Jansens
b9b3123305 when getting the state, grab the above/below from the max amongst other members of the client's group 2003-10-13 01:10:03 +00:00
Dana Jansens
cf397b0e60 smarter picking of heads for client windows 2003-10-11 08:24:49 +00:00
Dana Jansens
f5f59cea71 raise windows when they change modality 2003-10-11 08:21:51 +00:00
Dana Jansens
5592351585 give clients being restored from a session a little more flexibility in lpacement so they will go back where they were when saved 2003-10-11 07:35:05 +00:00
Dana Jansens
469b0c1ca9 handle case where session saves a 0 width/height (for maximized windows!) 2003-10-11 03:44:05 +00:00
Dana Jansens
c8678108eb indenting 2003-10-10 08:28:18 +00:00
Dana Jansens
1be38a0418 set the defaults for typed windows in client_get_all:
desktop types get put on all desktops
dock types get put in the ABOVE layer
2003-10-10 08:22:14 +00:00
Dana Jansens
e1eff99176 do client_raise after client_focus for new windows 2003-10-10 06:00:27 +00:00
Dana Jansens
6a00a44b99 indenting 2003-10-10 05:36:02 +00:00
Dana Jansens
b84a934ab7 provide function to tell if a client has any group siblings 2003-10-09 19:29:10 +00:00
Dana Jansens
bb52941999 cancel focus delays when the user runs a focus (or focus cycle) action, and when focusing new windows 2003-10-09 18:49:14 +00:00
Dana Jansens
5c390b9344 indenting 2003-10-09 16:46:54 +00:00
Dana Jansens
b7d2693742 dont give decorless windows a border when toggling decorations 2003-10-09 16:36:28 +00:00
Dana Jansens
b9d47c49d6 for dock windows, honor both the above and below states, keeping docks above and below *all* normal windows though (even 'above'/'below' ones). if the dock doesn't specify then it will stack along with normal windows. 2003-10-09 16:34:37 +00:00
Dana Jansens
440b862204 indenting 2003-10-08 18:27:30 +00:00
Dana Jansens
b968a7ac19 indenting 2003-10-08 18:27:10 +00:00
Dana Jansens
fb8a9a6363 indenting 2003-10-08 18:23:48 +00:00
Dana Jansens
f55766cc55 save premax values properly, individually for each direction 2003-10-06 17:33:23 +00:00
Dana Jansens
c4fcfc07e1 dont resize the window when restoring session state if the sizes are invalid 2003-10-03 07:33:27 +00:00
Dana Jansens
242dc35a36 indenting 2003-10-03 04:27:44 +00:00
Dana Jansens
c88e66b8ff use frame->visible instead of the desktop number 2003-10-01 17:51:20 +00:00
Dana Jansens
f9c659c12c fix resizing to 0 from aspect ratios 2003-09-28 07:38:55 +00:00
Dana Jansens
a434669d17 remove debug prints 2003-09-28 06:48:35 +00:00
Dana Jansens
f6ba1f27b9 halfway through client changes but...
should fix crashes irt actions in the action queue for clients that have been destroyed. now those actions are skipped or performed without a client as possible.
2003-09-28 06:31:00 +00:00
Dana Jansens
e30ae5696f remove from parents when changing groups 2003-09-27 17:57:02 +00:00
Dana Jansens
0dfff40a30 formatting, add an assert 2003-09-27 17:50:28 +00:00
Dana Jansens
51cc41e4db indenting 2003-09-27 17:39:44 +00:00
Dana Jansens
fbed66cc81 ok unfocus before removing transient shit, but remove focus related flags so we don't get focused in the fallback. 2003-09-27 06:41:00 +00:00
Dana Jansens
af7278b6e5 that was a really bad idea, i didnt mean it, i swear 2003-09-27 06:30:51 +00:00
Dana Jansens
8aee387193 unfocus before unlinking the client from the transient tree 2003-09-27 05:19:15 +00:00
Dana Jansens
0908816132 when looking for the focus target, search for modal children in the entire transient tree, not just children of the client on which focus is requested 2003-09-26 19:05:06 +00:00
Dana Jansens
dfd524926e add client_raise and client_lower which just fire off actions 2003-09-26 18:15:58 +00:00
Dana Jansens
411cc1d1d9 use actions for raising 2003-09-26 18:03:58 +00:00
Dana Jansens
bb541d850a bring back action_run_string 2003-09-26 18:01:44 +00:00
Dana Jansens
fb341869b1 use an action only for Raise 2003-09-26 17:46:49 +00:00
Dana Jansens
a2849a728d use actions to focus and raise the wnidow ni client_activate. this means the focus shit gets processed before the raise 2003-09-26 17:29:55 +00:00
Dana Jansens
360d1659a1 checked the wrong var for unmaxing 2003-09-26 15:08:03 +00:00
Dana Jansens
365940477b add some more client tree searching functions. make transients always get focused when a parent has focus, not just direct parents. 2003-09-26 07:08:07 +00:00
Dana Jansens
7dc01bbee7 remove debug print 2003-09-26 04:10:17 +00:00
Dana Jansens
b4fa843575 add client_set_undecorated().
add support for the _OB_WM_STATE_UNDECORATED state hint.
2003-09-25 23:07:15 +00:00
Dana Jansens
caca123b90 dont use the _OPENBOX_PREMAX window property anymore, save max and fullscreen pre-areas in the client struct 2003-09-25 22:47:48 +00:00
Dana Jansens
62b3b8c57e typo 2003-09-25 22:00:36 +00:00
Dana Jansens
54ccb6a542 focus new children if their direct parent is focused 2003-09-25 19:01:45 +00:00
Dana Jansens
710f41e622 focus nwe transients when another window in their transient tree is focused 2003-09-25 06:41:17 +00:00
Dana Jansens
624033c32d support the _KDE_WM_CHANGE_STATE hint 2003-09-24 17:17:51 +00:00
Dana Jansens
f68066aa63 we always want to start with something focused, moving this to openbox.c 2003-09-22 04:14:32 +00:00
Dana Jansens
6538a5ccb2 move the code to find the window under the pointer out of focus.c to client.c 2003-09-21 21:25:23 +00:00
Dana Jansens
38370b2e82 dont assert, just ignore client_unfocus() when the client isnt already focused 2003-09-21 18:43:11 +00:00
Dana Jansens
19e4820073 properly send resize events for when the app has requested the resize 2003-09-19 16:58:23 +00:00
Dana Jansens
abde4bc153 dont split client requested resizes into 2 events, thanks to manmower for this idea 2003-09-18 20:09:16 +00:00
Dana Jansens
16f46c296d no tabs 2003-09-17 07:44:49 +00:00
Dana Jansens
c4e4760c41 add copyright headers, adjust --version output to include copyright, and --help output to not include version output. 2003-09-17 07:32:52 +00:00
Dana Jansens
3a607fad9d revert my commit of d3th, it fucked up focus badly 2003-09-15 11:29:17 +00:00
Dana Jansens
4ccc4c5ed7 break focus. or maybe make it better.
these changes make it work when you alt-tab off a fullscreen window, that it doesnt iconify, and that it is immediately restacked instead of waiting for a FocusIn event to arrive. The code now assumes that if the window says it can focus, that if we focus it, it is focused.
add the XDone handler to ObMainLoop, which is fired upon the occurance of there being no more X events to read.
2003-09-15 10:54:07 +00:00