Commit graph

268 commits

Author SHA1 Message Date
Dana Jansens
6d26502631 super correct enter event ignoring that will only ignore what it has to, yay? 2007-05-18 00:11:01 +00:00
Dana Jansens
d30809e5fa always ignore errors for client_focus like we used to. 2007-05-15 17:38:52 +00:00
Dana Jansens
361bf6af5c simplify focus handling a bit. no need to listen to focus going to the frame because if it ever does that, the window is unmapping and the frame will just unmap and send it to root.
make focus fallback a lil more robust, it checks for errors when it sets focus on the window, and if an error occured it will focus the next option.
2007-05-15 04:32:59 +00:00
Dana Jansens
9c5e87069e don't do this stuff when it's already done. save bandwidth. 2007-05-15 03:47:39 +00:00
Dana Jansens
ec21f8c9ec yay for simplifying code. if we check for errors we dont need the "focus_tried" stuff 2007-05-14 22:58:08 +00:00
Dana Jansens
ff7eb1ea3d some debug prints 2007-05-14 13:47:03 +00:00
Dana Jansens
2676b61b0f missing a header 2007-05-13 22:30:58 +00:00
Dana Jansens
65a176330a dont set focus_client to NULL when sending focus to nothing, let that happen from the FocusOut events 2007-05-13 21:57:00 +00:00
Dana Jansens
7fddf2abc2 some focus fixes. always set the new focus when we fallback or else weird states appear. better handling of focusin's on clients that don't exist? 2007-05-13 20:35:44 +00:00
Dana Jansens
e28cbd61c1 kill grabs before xsetinputfocus 2007-05-13 18:27:58 +00:00
Dana Jansens
c23741290c fix directional focus 2007-05-13 15:40:16 +00:00
Dana Jansens
acfa2af3c2 use the right list in client_add_hide_notify, rename destructor to destroy_notify which is really what it is, and is more consistant now that there are 2 notifies 2007-05-13 07:45:15 +00:00
Dana Jansens
9f22554b6a when i said it handled both cases, i was mistaken, so use a callback for each case. 2007-05-13 07:40:02 +00:00
Dana Jansens
685dca1c5f likewise if a window is unmanaged and we were trying to give it focus, we want to know about it - also if the window gets hidden for some other reason, we also want to know about it.
add a notifier for windows being hidden, and use that instead - it handles both cases.
2007-05-13 07:38:35 +00:00
Dana Jansens
1e957a1688 some changes to focus handling.
most interesting is the change in focus_fallback, which means that it won't
call xsetinput focus in some cases, potentially reducing flicker and stuff.
also potentially producing bugs? heh.

the screen.c focus fallback code doesn't seem to need special cases anymore,
which is really good, if that is really the case.

move the focus_tried stuff out of event.c into focus.c, where it seems to
belong.
2007-05-13 07:09:34 +00:00
Dana Jansens
d00096dedb dont skip desktop windows that set skip_taskbar 2007-05-13 02:10:36 +00:00
Dana Jansens
1d1aef75a0 add <desktop>yes</desktop> option for Next/Previous window and directional focus actions 2007-05-12 17:16:01 +00:00
Dana Jansens
1d6c07c24b try catch weird racey corner case where we try fallback to a window but it unmaps as we do so, so focus ends up going to nowhere 2007-05-12 00:54:44 +00:00
Dana Jansens
ba6754ac88 fix focus cycling. checking the wrong client. 2007-05-11 04:10:45 +00:00
Dana Jansens
1e4215c5c6 merge r6176-6182 from 3.4-working 2007-05-08 21:57:36 +00:00
Mikael Magnusson
cc2ad0a823 double space in debug output 2007-05-08 02:22:07 +00:00
Dana Jansens
de82c4a5df i dont like this "application window" concept. swap it with "helper" windows instead which are the inverse. helper windows are utility/menu/toolbar windows. 2007-05-08 01:31:51 +00:00
Dana Jansens
38b12c6cba ! 2007-05-08 00:18:15 +00:00
Dana Jansens
e1081644c1 show the right icon 2007-05-07 16:57:02 +00:00
Dana Jansens
82b2f0aa7a popups fixes. if the text for the popup is empty now, there wont be extra padding for it. desktop name fixes. 2007-05-07 06:33:43 +00:00
Dana Jansens
5e0fa1b5c1 a variable sized alt-tab box. is this nice or slower to read? we'll see. 2007-05-07 03:54:39 +00:00
Dana Jansens
277db2822d a bunch of thigns got squashed into this commit.. sorry..
1. soem bug fixes for window stacking
2. clarify some functions behavior with their names
3. add (untested) support for legacy fullscreen apps. i have no idea what they do on a multihead xinerama setup though and if this would help there or need some changes.
2007-05-06 08:32:03 +00:00
Dana Jansens
2b658f3d9b show the desktop in the focus popup if its not on the current desktop 2007-05-06 06:01:52 +00:00
Dana Jansens
a7f65a818c add an allDesktops option to Next/PreviousWindow to alt-tab across all desktops. 2007-05-06 05:51:08 +00:00
Dana Jansens
857245960e give the focus indicator a fixed width 2007-05-06 05:37:45 +00:00
Dana Jansens
1bf9de3809 refactor all the session stuff. yay, it works properly now.
make sessions save the desktop being displayed. can we get rid of config_firstdesk now?
refactor startup a bit. focus the window that was focused when we were restarted.
have clients properly restore their session state.
add undecorated to the saved session state for clients.
2007-05-06 05:19:19 +00:00
Dana Jansens
b5e597f1b3 lots of fixes for the iconify animation. i think it should all work perfectly now ?
one change in action.c may affect bindings... THIS COULD BREAK CURRENT CONFIG FILES. ya.
so, if you used a press binding and it moved the window, no enter event will be generated for that anymore because you are holding down the button when the window moves. if you don't like that then use a click binding instead.

1
2007-05-05 16:16:26 +00:00
Dana Jansens
a56d3a12ab missing parentheses 2007-05-05 02:12:39 +00:00
Dana Jansens
03f861b0ac let you alt-tab to utility windows when focus is already in the group 2007-05-05 01:37:51 +00:00
Dana Jansens
5784f11132 add the notion of "application windows" meaning normal or dialog type windows.
let you alt-tab to non-application windows when they dont have an application window in their group
2007-05-03 20:57:40 +00:00
Dana Jansens
f2890f35b7 remove delay for focus/desktop popups. its fast anyway any not showing it is annoying 2007-05-02 23:43:36 +00:00
Dana Jansens
1d9c0e8b87 skip windows which skip the taskbar.
don't skip them for cycling dock windows.
2007-05-02 21:53:27 +00:00
Dana Jansens
0da9aa2660 add a slight delay to the focus/desktop switch dialogs. so if you hit the key really fast there is no flicker. of course if you hit it fast but not fast enough there is still flicker. is this cool or does this make it feel bad? i dunno. we'll see..
make the keychain popup use the new delay popup facilities
2007-05-02 00:59:07 +00:00
Dana Jansens
66d6e1120e small change to the render API. RrMinsize became RrMinSize. added RrMinWidth and RrMinHeight.
make focus/desktop popups wider based on the screen size with the old size as a minimum.
left-align the desktop dialog.. i think better dialogs would be nice. and to make them hide or something when you switch desktops while switching windows etc.
2007-05-02 00:35:22 +00:00
Dana Jansens
6e83a82e5b the focus_client = NULL got moved by mistake. 2007-04-24 06:41:59 +00:00
Dana Jansens
c6fe4f8d8f focus_order_remove is called in a few places. move the check for unsetting focus_client into client_unmanage. 2007-04-24 06:41:04 +00:00
Dana Jansens
b4eecc51b5 focus_client was becoming invalid if the focused client was unmanaged. 2007-04-23 23:11:33 +00:00
Dana Jansens
9f11e2af6b cycling between dock windows now possible with the <panels>yes</panels> option 2007-04-23 22:40:33 +00:00
Dana Jansens
ea088eb88d remove an unused variable 2007-04-23 17:55:26 +00:00
Dana Jansens
eb18f502b5 fallback to desktops properly 2007-04-23 02:43:14 +00:00
Dana Jansens
86b7f4e543 use event_ignore_queued_enters 2007-04-22 22:21:32 +00:00
Dana Jansens
3265ea9ac1 when focusing nothing, make sure focus_client knows that nothing is focused 2007-04-22 20:33:12 +00:00
Dana Jansens
911ad76372 a) set the focus client before calculating its layer
b) cleanup in focus.c
2007-04-22 19:35:50 +00:00
Dana Jansens
bfb800c032 a) remove focus_hilite, it is not needed and complicated things
b) set focus_client to null when nothing is actually focused, but still allow
   focus to go to black holes
c) allow the focus action to be performed without a client, this will focus
   the openbox instance (i.e. the screen in multihead setups)

big thanks to syscrash for the ideas on how to go about this
2007-04-22 19:13:38 +00:00
Dana Jansens
27773e1cb7 don't grab the pointer during interactive events. this allows you to alt-tab during a dnd. 2007-04-22 15:22:25 +00:00
Dana Jansens
939fbcfd31 add a comparitor to timers. use this in event.c to let you remove timers from the queue selectively for delayed focus 2007-04-22 04:16:00 +00:00
Dana Jansens
73b490f614 stop delayed focusing when falling back 2007-04-22 03:02:13 +00:00
Dana Jansens
3f2d342de8 hide focus debugging messages 2007-04-21 21:04:35 +00:00
Dana Jansens
33cc572402 drop some wasted client_validates. 2007-03-28 02:00:10 +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
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
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
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
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
fe31716486 fallback to transient parents properly 2007-03-11 17:05: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
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
8c9b2e8f17 >:| I put old code back somehow.. thanks mika. hooray peer review :) 2007-03-11 00:00:05 +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
ccebe3c441 skip windows in alt-tab that have SKIP_PAGER set. perhaps this is a better metric.. also this is for mikachu <3 2007-03-10 23:09:27 +00:00
Dana Jansens
42c6cdd0c8 people have started using SKIP_TASKBAR, and it's not for stuff you don't want to be able to alt-tab to. so don't put that in here anymore. 2007-03-10 23:03:08 +00:00
Dana Jansens
56307d6077 a) remove the top_grip_height business from the theme
b) make the focus indicator based on border width and padding, not the handle height
c) add 2 more windows for the top corners for resizing, much easier to find them now. also base their width on padding, not the handle height or other weird things
2007-03-08 01:26:03 +00:00
Dana Jansens
88204502a8 don't use handle_height for focus indicators, use top_grip_height. is this better? 2007-03-05 16:10:32 +00:00
Dana Jansens
ec304c9e43 scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.

Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd

ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.

PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.

In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.

New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow

This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.

Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.

Here's the font configuration example. Hopefully ObConf will let you set this real soon.

<theme>
...
  <font place="ActiveWindow">
    <name>arial,sans</name>
    <size>7</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
  <font place="InactiveWindow">
    <name>arial,sans</name>
    <size>7</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
  <font place="MenuTitle">
    <name>arial,sans</name>
    <size>8</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
  <font place="MenuItem">
    <name>arial,sans</name>
    <size>8</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
</theme>
2007-03-05 15:44:17 +00:00
Dana Jansens
de383f35f7 no more using SaveUnder for our openbox-specific windows. it makes things actually slow down, believe it or not! 2007-03-02 22:06:13 +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
4d50b21835 update copyright step 1 2006-08-22 16:37:35 +00:00
Mikael Magnusson
dce6247e69 really fix focus_last? 2006-08-04 19:56:42 +00:00
Mikael Magnusson
be8bc711b2 make the Unfocus action do something when config_focus_follow is set 2006-08-02 04:45:52 +00:00
Mikael Magnusson
48e3f64bc0 must assign return of g_list_insert_before to list, the start address may have changed 2006-06-11 10:36:31 +00:00
Mikael Magnusson
1ed2670b89 revert patch, doesnt work 2004-08-22 00:23:44 +00:00
Mikael Magnusson
6ec5ccdf63 fix the unfocus action when focuslast is set, patch by faugn 2004-08-22 00:01:45 +00:00
Mikael Magnusson
3afbf3d597 forgot these 2004-06-23 14:06:08 +00:00
Mikael Magnusson
0993012776 try to fix focus switching with mouse actions up a bit 2004-06-23 13:50:26 +00:00
Mikael Magnusson
269fbc0fe0 show parents title in alt-tab popup for titleless transients 2004-03-31 09:56:01 +00:00
Mikael Magnusson
b2b8ad92bf update copyright notices 2004-03-21 11:57:31 +00:00
Mikael Magnusson
dd7c6ad734 add back the focusLast option for the "i lost count"th time 2004-02-24 20:26:08 +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
9fae7e8b1e dont use the parent's title in the focus cycling dialog 2003-10-18 22:15:32 +00:00
Dana Jansens
7c827e16ba assert that add_new is not making a duplicate entry 2003-10-18 22:11:18 +00:00
Dana Jansens
2aa5cd3574 allow parents of transients to be focus cycled to 2003-10-18 22:08:37 +00:00
Dana Jansens
740c5b2a20 consistant glib type usage 2003-10-15 03:59:35 +00:00
Dana Jansens
b051b3499d smarting picking for cycling to windows woth transients 2003-10-13 07:57:43 +00:00
Dana Jansens
ba38a0c856 make em saveunder 2003-10-12 23:44:21 +00:00
Dana Jansens
c2b0272fde color_black was unused 2003-10-11 06:48:13 +00:00
Dana Jansens
423d70b418 dont leave the focus indicator hanging around when dialogs are disabled 2003-10-10 05:56:12 +00:00
Dana Jansens
97ffa9e3e2 make a copy of the color 2003-10-10 05:33:31 +00:00
Dana Jansens
9eed0756a4 add the focus cycle indicator to directional focus cycling 2003-10-09 19:58:09 +00:00