Commit graph

4724 commits

Author SHA1 Message Date
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
b5af5ad3e8 was using paddingx for y-things, oops 2007-03-08 01:08:44 +00:00
Dana Jansens
b37a8b7e76 Fix possible crashingness, from last commit. 2007-03-08 01:03:13 +00:00
Dana Jansens
a79651294c Split RrPaint to RrPaint and RrPaintPixmap, so you can paint things other than windows. If you don't free the returned pixmap though, you will be leaking memory in the server! 2007-03-07 22:57:10 +00:00
Dana Jansens
efedb4df9c Be more lenient with errors in xml file. If there are errors, try to keep loading it anyways. 2007-03-07 22:56:37 +00:00
Dana Jansens
1cbd7960fb don't install the old themeupdate.py file 2007-03-06 02:58:24 +00:00
Mikael Magnusson
c18edc32aa update my theme 2007-03-05 16:55:21 +00:00
Dana Jansens
a79ff2cd44 put artists original comments back into the themes after regenerating them 2007-03-05 16:48:49 +00:00
Dana Jansens
d4977a6d03 missed updating this one 2007-03-05 16:46:51 +00:00
Dana Jansens
80207fa30f proper shadow tint values 2007-03-05 16:33:22 +00:00
Dana Jansens
82be671c64 scale the shadows up, they were /100 before, now they are /255 2007-03-05 16:32:50 +00:00
Dana Jansens
afac57ad00 theme converter had a bug! menu item font is parsed now. 2007-03-05 16:28:04 +00:00
Dana Jansens
b31189b91a was looking for menu items font in the wrong place 2007-03-05 16:27:02 +00:00
Dana Jansens
358c203df2 follow new xsd 2007-03-05 16:24:35 +00:00
Dana Jansens
45087efbcd point and padding became redundant.. do remove padding type from xsd and use point type. also fix bug in theme parser where it was looking for wrong one. 2007-03-05 16:23:13 +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
d209d828a7 assert on invalid color values 2007-03-05 05:25:16 +00:00
Dana Jansens
36effc5ab7 enable startup notification by default. 2007-03-05 04:35:54 +00:00
Dana Jansens
e6fba91476 kde systray applications no longer need the tray proxy, so let's remove it from svn 2007-03-05 03:33:00 +00:00
Dana Jansens
5697404dd6 add the themetoxml tool ! yay 2007-03-05 03:30:22 +00:00
Dana Jansens
6608dddef4 add comment explaining what this tool is for. new themeupdate tool is coming for xml themes. 2007-03-04 22:22:27 +00:00
Mikael Magnusson
092ef0e6dd mention that it is in fact openbox that crashes 2007-03-04 21:46:13 +00:00
Dana Jansens
ca9fe26a6b use EXIT_SUCCESS. it's the same thing, but more correct. 2007-03-04 20:42:22 +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
2f87655790 remove said Atoms 2007-03-04 20:18:09 +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
191a0bc075 i moved the font shadow stuff back into the theme, so move them out of the font configuration stuff 2007-03-04 18:49:16 +00:00
Dana Jansens
7744067b6b moving shadow information out of the themes, and into the Text textures.
cleaning up some old Xft cruft in font.c also, that is no longer needed.
2007-03-04 18:47:21 +00:00
Dana Jansens
5109b5ae20 keep the default tint at 50, for theme compatibility 2007-03-04 17:31:18 +00:00
Dana Jansens
e5ad7721ff add the new font things to our example rc.xml and the xsd stylesheet 2007-03-04 17:18:40 +00:00
Dana Jansens
25917a3498 change the rc config format for font shadows, now:
<font...
  <shadow enabled="yes/no">
    <offset>1</offset>
    <tint>25</tint>
  </shadow>
</font>
2007-03-04 17:04:50 +00:00
Dana Jansens
f7fe596e28 lighten the default shadow, it's alittle harsh right now 2007-03-04 17:03:50 +00:00
Mikael Magnusson
b7964c3bae fix compiling without session manager support 2007-03-04 12:00:21 +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
17b2d57717 Fonts are now going to be configured in the rc.xml file. The format is such as
<theme>
...
  <font place="ActiveWindow">
    <name>arial,sans</name>
    <size>8</size>
    <weight>bold</weight>
    <slant>italic</slant>
    <shadow>yes</shadow>
    <shadowOffset>1</shadowOffset>
    <shadowTint>64</shadowTint>
  </font>
</theme>

Valid place="" are ActiveWindow, InactiveWindow, MenuTitle, and MenuItem.
Only valid weight is "bold"
Valid slants are "italic" and "oblique"
shadowTint is a value between -100 and 100
size is the font size in points. pixelsize could possibly be added in the form of 8px, but it's not right now.
the name can contain multiple families and they will all be used to match characters

You can omit any fields and get the default for it. You can omit naming a font for a place="" and get the default font for it.

This is completely replacing theme-specified fonts, for better or for worse. Font shadowing may go back into the theme at some point, instead of in the rc.xml.
2007-03-04 07:18:04 +00:00
Dana Jansens
d0f9d647aa remove the font code for parsing Xft font strings. we are using the individual values specified in the user's configuration now, no longer using the strings from the theme file at all 2007-03-04 07:14:25 +00:00
Dana Jansens
43d0f79057 fonts are no longer loaded from the theme file. instead, they are created by the application and passed in while creating/loading a theme 2007-03-04 07:12:34 +00:00
Dana Jansens
aeda86f460 add parse_attr_bool, and fix a possible segfault 2007-03-04 07:09:55 +00:00
Dana Jansens
3b77950a79 add font weight and font slant enumerations 2007-03-04 01:08:51 +00:00
Dana Jansens
ac6fe98008 use font 8point by default if none is specified 2007-03-04 01:08:33 +00:00
Dana Jansens
41e272bd27 add missing comment 2007-03-04 00:47:26 +00:00
Dana Jansens
aa852556c0 let the configuration file changes affect windows' decroations and functionality on reconfigure (fix keepBorder bug 2841 2007-03-03 21:10:15 +00:00
Dana Jansens
73671503fa don't change the restart type with the session manager when openbox exits. it's not like something else will magically run instead. if we exit, we should get started again, that's why --replace exists. 2007-03-03 06:04:00 +00:00
Dana Jansens
65f0c70851 pretty brackets 2007-03-03 03:53:10 +00:00
Dana Jansens
9d1949f0b1 if sm is disabled, there is nothing to shutdown, so don't go trying to free things and stuff. that can only be a bug 2007-03-03 03:47:50 +00:00
Dana Jansens
831deb72c6 ok this time for real...
add --reconfigure option to openbox.

this option will open the display, find the current openbox's PID from the root window, and send a SIGUSR2 to it, telling it to reconfigure. then it exits.

also no longer printing help if you pass an invalid argument to openbox (because i want to parse arguments for --reconfigure before i start up the session management stuff)
2007-03-03 03:43:45 +00:00
Dana Jansens
48a7c32512 make a copy of the argc and argv instead of modifying the real ones
this means that when openbox is restared it doesn't lose it's SM related command line args, they get passed to the new openbox same as they were passed to the one exiting.
2007-03-03 03:42:28 +00:00