Commit graph

256 commits

Author SHA1 Message Date
Mikael Magnusson
ebbcacae15 focus fallback 2007-03-14 01:17:39 +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
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
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
aaabb13c0a add _NET_WM_FULL_PLACEMENT, cuz openbox does do placement, even tho it can be sucky right now, lol. but it's good for dialogs and stuff, which is what this is talking about.
also add _NET_WM_MOVERESIZE_CANCEL.
2007-03-11 05:00:56 +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
3f7ad89510 let windows move themselves off the screen somewhat, but don't let them resize themselves off the screen (unless they're moving too) 2007-03-10 22:24:47 +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
Mikael Magnusson
7fdfb9dbf6 use ob_reconfigure/restart directly instead of actions and save a variable 2007-03-04 20:32:47 +00:00
Mikael Magnusson
e06e69b904 use integers instead of atoms for the actual control action 2007-03-04 20:16:41 +00:00
Mikael Magnusson
e979b388d8 use the X protocol to reconfigure instead of signals, works over the network too 2007-03-04 20:05:00 +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
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
4d50b21835 update copyright step 1 2006-08-22 16:37:35 +00:00
Mikael Magnusson
7b7f158088 add a means to tell the timer destroy function not to fire when for example freeing its client frame 2006-08-17 20:16:02 +00:00
Mikael Magnusson
a2f2fefeff add a client destructor to frame.c so it doesn't try to keep flashing a free'd frame 2006-08-17 16:16:37 +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
abe258be1d <group> option for raise/lower related actions. hi floam. 2005-02-08 04:33:54 +00:00
Mikael Magnusson
9f607e2545 hopefully fix the 'sticky keys' issue, patch from debian maintainer tore who got it from somewhere 2005-01-06 18:50:01 +00:00
Mikael Magnusson
ebc21270f1 dock: leftclick = raise, middleclick = lower. make this bindable later, but better than all buttons (incl scroll) raising it for now 2004-07-22 22:50:48 +00:00
Mikael Magnusson
b2b8ad92bf update copyright notices 2004-03-21 11:57:31 +00:00
Mikael Magnusson
335e8acbfc yay no tabs in the source 2004-03-21 01:03:00 +00:00
Mikael Magnusson
bc04408517 some nice options for the menus, warpPointer, xorStyle (better name wanted for this :), hilightFirst and hideDelay (this was hardcoded to .25 secs earlier) 2004-03-20 22:53:16 +00:00
Mikael Magnusson
8a3bfe527c whitespace changes 2004-03-20 15:48:38 +00:00
Mikael Magnusson
0e6161b0d4 the old event code 2004-03-18 11:54:15 +00:00
Dana Jansens
18ac56b9db add comment 2003-10-15 17:04:27 +00:00
Dana Jansens
53a259f60d focus fallback when focus is on PointerRoot 2003-10-15 07:29:17 +00:00
Dana Jansens
740c5b2a20 consistant glib type usage 2003-10-15 03:59:35 +00:00
Dana Jansens
e6c9efa71d unhilite windows correctly, forget how to break it without this :) what can i say? im high! 2003-10-14 07:21:54 +00:00
Dana Jansens
94901fab5a remove debug print 2003-10-13 08:04:48 +00:00
Dana Jansens
dc9c39d042 handle multiple focusin/out in one batch 2003-10-13 04:01:11 +00:00
Dana Jansens
568744d572 allow focus to be moved off top level managed windows, as long as its not None or the root. 2003-10-12 20:28:35 +00:00
Dana Jansens
7ca410e663 fix a crasher hopefully 2003-10-11 14:38:45 +00:00
Dana Jansens
f8f3b3ed13 screw that 2003-10-11 07:43:20 +00:00
Dana Jansens
c1d065243a make _NET_WM_ACTIVATE messages bring the client to the current desktop 2003-10-11 07:40:27 +00:00
Dana Jansens
e69da364cc make keyboard events work on the focus_cycle_target again 2003-10-09 19:08:07 +00:00
Dana Jansens
0ba8c17565 use focus_hilite to pick which window gets keyboard events 2003-10-09 18:54:08 +00:00
Dana Jansens
8e34732b3a let stuff cancel any focus delays going on 2003-10-09 18:48:44 +00:00
Dana Jansens
df436132bd remove windows from the focus delay timer when the pointer leaves them 2003-10-09 17:32:37 +00:00
Dana Jansens
723ecebc2f use focus_hilite to ensure that when a wnidow thats not focused is hilighted, the hilight is removed when focus gets assigned 2003-10-08 18:29:12 +00:00
Dana Jansens
2a2008e837 always set focus_out, since a focusin can come first and mess up the old logic 2003-10-03 07:24:33 +00:00
Dana Jansens
2572f111e0 indenting 2003-10-03 07:07:57 +00:00
Dana Jansens
aa6bedd78b remove debug prints 2003-10-03 07:05:36 +00:00