Commit graph

387 commits

Author SHA1 Message Date
Dana Jansens
7b408bc3b8 Add a strict option to the ToggleShowDesktop action
When the strict option is used, normal windows are not able to show themselves
while showing the desktop.
2013-09-09 10:47:43 -04:00
Ian Zimmerman
f866c034bf Add the old <center> option for the placement policy. (Bug 5946)
Original commit messages:
. Reformat to move closer to house style
. Add center on top of leat overlap place algo
. Add sentinel value to edge arrays
. Use a Size instead of a Rect for a centering field
. Fix off by one bug
. Need to declare dx and dy
. Pass length of edge array instead of recomputing
. Fix missing open-brace in config.c
. Address the more trivial subset of danakj comments
. Revert "Remove now-unused config_place_center option."
  This reverts commit 5e282dae08.
. Remove reliance on sentinel value when scanning edge arrays
. Avoid need to initialize Size structure by removing it :)
. Clean up field expansion code somewhat
. Compress code further by using a structure for common args
. Fix search for next grid point
. Squeeze it even more by not using Size at all
2013-09-01 15:09:03 -04:00
Dana Jansens
10a833b2cb Allow application rules to control window size (Fix bug 4661)
Use the following in your per-app rules:

<size>
  <width>A</width>
  <height>B</height>
</size>

A and B can be integer values to specify a size in pixels. They can also be
percentages or fractions to be relative to the size of the monitor the window
is placed on.
2012-10-06 23:04:57 -04:00
Dana Jansens
5e282dae08 Remove now-unused config_place_center option.
The new LeastOverlap placement doesn't use this option, and it kind of defeats
the purpose of the algorithm.
2012-10-06 22:52:31 -04:00
Dana Jansens
d0ba880668 Don't let autostart checking for background-setting tools end up in logs (Fix bug 5186) 2012-10-06 22:30:02 -04:00
Denis Kaganovich
1974c69fb3 Fix some namings and xml formatting in rc.xml and rc.xsd 2012-10-06 22:30:02 -04:00
Xin Wang
c6997ba19e Print error message to stderr (Fix bug 5731)
As stdout is redirected to /dev/null by some DMs, we need to print error
messages to stderr.
2012-10-06 21:56:57 -04:00
Denis Kaganovich
65693d18db Address a couple bugs in rc.xsd (Fix bug 5746) 2012-10-06 21:56:57 -04:00
Julian Ospald
9154bddf35 Make .desktop files obey specs where possible (Fix bug 5737) 2012-10-06 21:56:56 -04:00
Dana Jansens
6eb740cf11 Allow window matching based on the group leader's name and class (Fix bug 5721)
In Openbox 3.4 we used the group leader's WM_CLASS value when it was available.
This prevents windows in the group from overriding with a specific value,
however which is bad. More rationale can be found in
http://icculus.org/pipermail/openbox/2010-September/006790.html

Some applications (eg. Firefox) use command line flags to set the WM_CLASS
property on the group leader but do not change the property on the mapped
windows themselves. This makes matching these windows not possible in Openbox
3.5.

We resolve this by exposing the group's WM_CLASS values alongside the individual
window's values. We add _OB_APP_GROUP_NAME and _OB_APP_GROUP_CLASS properties
along with "groupname" and "classname" attributes for the rc.xml application
tag.
2012-10-06 21:56:56 -04:00
Dana Jansens
dc4cfa94c9 Make LeastOverlap placment replace the behaviour of Smart and address style nits 2012-10-06 21:56:56 -04:00
Ian Zimmerman
4d2ccf1916 LeastOverlap placement option (Fix bug 5385)
Adds a new placement algorithm that finds a place on the monitor that overlaps
the least amount of windows as possible.

Original patch by Ian Zimmerman <itz@buug.org>.
Port to Openbox 3.5 by David Vogt <dv@adfinis.c>.
2012-10-06 21:56:56 -04:00
Dana Jansens
3991e148e2 Fixes for gnome-session 3.
We run by default with a panel (default gnome-panel) and then run Openbox
without any panel if one cannot be found.

- Adds a fallback session for if a panel (default gnome-panel) not found.
- Removes notifications as a requirement.  Seems to be a legacy thing judging
  from the ubuntu .session files.  Notifications are being provided by
  notify-osd on modern systems, and you can't check for its presence in
  gnome-session (gnome-classic.session always fails because it looks for it, so
  ubuntu falls back to gnome-fallback.session).
2011-10-16 18:51:51 -04:00
Mikael Magnusson
c885c9a676 Change default doubleclick timeout to 500ms and keep track of where last click was
Bug #5152 - "mouse double-click time is too low by default - 200ms"

We only use the doubleclick in one place in the default configuration,
for doubleclicking titlebars to maximize windows, so any negative impact
of increasing the timeout should be minimal, especially with the
addition of requiring the two clicks to be in the same place.

Doubleclicks are hardcoded to occur within 8 pixels for now, it doesn't
seem worth it to add a config until someone complains. A possibility is
using the drag threshold, but some people have that set very low so it
could be hard to doubleclick then.
2011-10-16 22:50:26 +02:00
Geoffrey Antos
3f870080de Make openbox-gnome-session compatible with gnome3 with gnome-session 3.0+ support.
Yay they did something nice and made it easier for other window managers to be used.  How unexpected and pleasant.
2011-10-07 09:38:25 -04:00
Dana Jansens
a23954ec17 bug #5253 kde4 is out now, use kde4 menus by default.
Startup scripts should export "XDG_MENU_PREFIX=kde-4-" but they export
"XDG_MENU_PREFIX=kde-".
2011-10-05 13:42:50 -04:00
Dana Jansens
65315ca437 The environments are passed in from the openbox-session script so use them. 2011-08-01 11:51:38 -04:00
Dana Jansens
5b2ed63cb4 Fix bug #4877 (Some harmless code quirks involving booleans) 2011-08-01 11:50:16 -04:00
Dana Jansens
6624d06dd1 fix global autostart installation, and the pointer to it so it is run 2011-04-11 17:25:45 -04:00
Dana Jansens
7c33f45e09 make the default drag threshold 1. it is smooth and feels and looks nice.
(also macos has it and i liked it.)
2011-01-24 14:19:23 -05:00
Dana Jansens
a8dbf2e74e add primary monitor stuff to rc.xsd 2011-01-24 14:19:22 -05:00
Dana Jansens
95535e8623 Big changes to placement across multiple monitors.
Add a Primary option for which monitor to place new windows on.  Make "Active" the default instead of "Any", which is just totally crazy.

When a window is being placed in the FOREGROUND, use a monitor chosen in
  the following order:
  1. same monitor as parent
  2. primary monitor if placement=PRIMARY
     active monitor if placement=ACTIVE
     pointer monitor if placement=MOUSE
  3. primary monitor
  4. other monitors where the window has group members on the same desktop
  5. other monitors where the window has group members on other desktops
  6. other monitors

When a window is being placed in the BACKGROUND, use a monitor chosen in the
  following order:
  1. same monitor as parent
  2. other monitors where the window has group members on the same desktop
   2a. primary monitor in this set
   2b. other monitors in this set
  3. other monitors where the window has group members on other desktops
   3a. primary monitor in this set
   3b. other monitors in this set
  4. other monitors
   4a. primary monitor in this set
   4b. other monitors in this set

Decide to focus the new window before placing it, so we know if it will be
  placed in the foreground or background.

Always choose a single monitor, then place on it, rather than possibly moving
  to a "backup" monitor.  Unpredictable monitor placement is horrible.
2011-01-24 14:19:22 -05:00
Dana Jansens
4f8503c2c5 Allow XIncludes in xml documents we read.
Add the XInclude namespace in the default config file (named "xi")
2011-01-24 14:19:22 -05:00
Dana Jansens
4463bb6e2f merge some contexts together in the default rc.xml mouse bindings 2010-05-17 19:31:57 -04:00
Dana Jansens
77ee361f5c allow warping the mouse pointer when switching desktops by bumping into the edge of the monitor with a window
based on a patch by Nathaniel Gephart <computinchuck@gmail.com>
2010-04-16 21:32:38 -04:00
Dana Jansens
daa2e0ab71 libexecdir is provided by automake, and gnome-settings-daemon is not always in /usr/libexecdir, use the dir from automake 2010-02-24 13:32:32 -05:00
Dana Jansens
115039fb49 Type is a mandatory field of a .desktop, so add it to the old gnome-interfacing-desktop file 2010-02-24 13:32:32 -05:00
Dana Jansens
6976f4198b Show client menu on right click anywhere on a window frame (left and right were excluded) 2010-02-21 13:40:22 -05:00
Dana Jansens
bcc31faf7e revamp the autostart functionality, so autostart apps launch after openbox.
add /usr/libexec/openbox-autostart which runs the global/user scripts and
  launches /usr/libexec/openbox-xdg-autostart (which runs .desktop autostart
  stuff)

make openbox-session call openbox with --startup option, to make openbox launch
  /usr/libexec/openbox-autostart *after* it is initialized.

add /etc/xdg/openbox/environment and ~/.config/openbox/environment files to let
  user change environment variables (locale) for their Openbox session, which
  openbox-session loads before running openbox.
2010-02-17 16:11:36 -05:00
Dana Jansens
a8554def0e lower the default submenu show delay 2010-02-16 22:00:48 -05:00
Dana Jansens
31f0c8c1ad Merge branch 'backport' into work 2010-02-05 13:47:58 -05:00
Dana Jansens
2ab63cb36f make xdg-autostart use the OPENBOX environment by default, so you can say OnlyShowIn=OPENBOX in a .desktop and it will work as expected 2010-01-27 20:01:24 -05:00
Dana Jansens
14f8b4cb54 Fix bug #4492 better, the test in openbox-gnome-session needs to be inverted 2010-01-24 00:07:56 -05:00
Dana Jansens
6cf3357036 allow app rules to match windows by their title when mapping
and save the title in the _OB_APP_TITLE property
2010-01-14 18:41:21 -05:00
Dana Jansens
3bd4397b6e Merge branch 'backport' into work
Conflicts:

	openbox/frame.c
2010-01-14 16:19:57 -05:00
Dana Jansens
62e36ad041 Fixes bug #4492 (mis-using the return value of grep -q in openbox-gnome-session script 2010-01-12 14:29:23 -05:00
Dana Jansens
567fd15eeb Merge branch 'backport' into work
Conflicts:

	configure.ac
	data/rc.xml
	openbox/client.c
	openbox/event.c
	openbox/focus_cycle.c
	openbox/focus_cycle_popup.c
	openbox/openbox.c
	openbox/prop.c
	openbox/prop.h
	openbox/screen.c
	parser/parse.c
	version.h.in
2010-01-11 16:20:53 -05:00
Dana Jansens
91af4d5bc9 Add _OB_VERSION and _OB_APP_ROLE/CLASS/NAME/TYPE
Add _OB_VERSION property on the root window.
Change _OB_ROLE/CLASS/NAME to _OB_APP_*.
Add _OB_APP_TYPE which has a string for the type chosen for the window on
  mapping by Openbox.
Adjust the rc.xml to match these changes.
2010-01-11 13:42:50 -05:00
Dana Jansens
b3cc8f4876 allow application rules to place transient/dialog/splash windows, and allow application rules to match only on the role or type if you wish. 2010-01-10 22:15:27 +01:00
Dana Jansens
8c9fb63baa Rework the code provided by Kadlcik Libor for loading/showing icons in Openbox menus.
This changes how the imagecache works, you can load an image into it directly,
or you can load it by name (then it will load it from a file on disk).

NOTE: The name part is incomplete, as it needs to use the freedesktop.org icon
spec to search for the right file.  Also to resize it should look for another
icon on disk with the same name but different size (icon themes).
2010-01-08 17:55:19 -05:00
Dana Jansens
73575c10ce Merge branch 'backport' into work
Conflicts:

	Makefile.am
	openbox/actions/focus.c
	openbox/config.c
	openbox/event.c
	openbox/menuframe.c
2010-01-08 10:22:30 -05:00
Dana Jansens
e8588737c9 Allow infinite delay for submenu show/hide by using a negative value. 2010-01-06 17:13:03 -05:00
Dana Jansens
b88cf22bc0 Some fixes for the submenu hide delay code
When nothing in a menu is selected, go back to selecting the open submenu.
Adjust the LeaveNotify event handling to only respond when there is not a
  EnterNotify coming for the same menu frame.
Change the default submenu show/hide delays.
Have the default values for submenu show/hide match the default rc.xml
2010-01-06 17:13:03 -05:00
Alexey Korop
8968b38338 improve submenu hide delay 2010-01-06 17:13:03 -05:00
Dana Jansens
c6370aa48a fix a broken if statement (bug #4464) 2010-01-05 21:37:58 -05:00
Dana Jansens
4f414ed0f1 Set the XDG_MENU_PREFIX to "kde-" when running an Openbox/KDE session. 2010-01-02 15:49:39 -05:00
Dana Jansens
a03b817aeb Merge branch 'backport' into work 2009-12-21 10:43:38 -05:00
Dana Jansens
b7393636e0 make a config option for the inactive osd font 2009-12-21 10:43:30 -05:00
Dana Jansens
6d8b7bd5f7 Rename obprop to obxprop (Fixes bug #4419)
Avoids collision with openbabel.
2009-12-21 09:59:28 -05:00
Dana Jansens
ad812e6299 Add a focus option, unfocusOnLeave that removes focus from a window when the pointer leaves it
This uses the same delay to unfocus as is used for focusing on enter
2009-12-18 11:40:00 -05:00