Fix interpretation of struts with multiple screens
According to the WM Specification, the left, top, right, and bottom
fields are to be declared relative to the overall X screen dimensions,
not the monitor dimensions.
The example given in the spec (v1.3 or 1.4draft2) is: "Another example
is a panel on a screen using the Xinerama extension. Assume that the
set up uses two monitors, one running at 1280x1024 and the other to the
right running at 1024x768, with the top edge of the two physical displays
aligned. If the panel wants to fill the entire bottom edge of the smaller
display with a panel 50 pixels tall, it should set a bottom strut of 306,
with bottom_start_x of 1280, and bottom_end_x of 2303. Note that the strut
is relative to the screen edge, and not the edge of the xinerama monitor."
In my case, I have a 1680x1050 monitor to the left of a 1920x1200 monitor
aligned at the top. I then have a gnome-panel along the bottom edge of
the 1680x1050 monitor with a height of 24 pixels.
xprop reports the following partial strut: _NET_WM_STRUT_PARTIAL(CARDINAL)
= 0, 0, 0, 175, 0, 0, 0, 0, 0, 0, 0, 1679 which is correct according to
the spec. Gnome-panel is reserving the 150 pixels along the bottom that
aren't visible on the screen plus the 25 it requests for itself.
However, maximizing a window on this monitor leaves a gap of exactly 150
pixels between the bottom edge of the maximized window and the top edge
of the panel.
Also, when the 1680x1050 monitor is the primary monitor (id=1) then the
_NET_WORKAREA property on the root window is also off by 150px for the
same reason.
This patch fixes the two issues I mentioned for exterior monitor edges.
It doesn't attempt to account for "interior" monitor edges (i.e. a 'left'
strut on monitor A when monitor B is directly to the left of monitor A)
because it's not possible to do so with the current strut specification
(see http://mail.gnome.org/archives/wm-spec-list/2004-March/msg00004.html
for a discussion on this limitation)
This could be avoided by having the partial strut atom contain a xinerama
screen ID that the strut applies to, but unfortunately the discussion
all those years ago never got anywhere.
Add "prev" and "next" as possible targets for moveto/resizeto actions.
One of the Debian users asked if it's possible to send a window to other
monitor when using xinerama, especially useful of you have 2 monitors and want
to toggle a window to the other one. I wrote a patch that implements next and
prev to also make that work for 3 or more workspaces.
As suggested in #3622, we don't need to open the default font for every
place that wasn't specified in the theme. Solved a bit differently than
the patch given there.
Mikael Magnusson [Fri, 20 Feb 2009 16:41:34 +0000 (17:41 +0100)]
Fix per-app monitor setting
A couple of things were wrong, the parser added 1 to the value despite
expecting the user to give values in the range of 1 to
screen_num_monitors, rc.xml documented the values to start from 0 and
finally the monitor value wasn't copied over at all when matching the
client.
Mikael Magnusson [Sat, 15 Nov 2008 21:50:16 +0000 (22:50 +0100)]
Use ngettext for %d desktop(s).
This poses a small problem. We currently let translators reorder this
string, but ngettext only takes one numeric argument. This means that you
can either get correct pluralization or the order you want, but not both.
I fixed up the languages I understand at a very basic level, but the
rest will need translator assistance.
Mikael Magnusson [Sun, 26 Oct 2008 23:10:57 +0000 (00:10 +0100)]
Correct a 64-bit bug in event_time_after
The code assumed the timestamps had the same domain as the type Xlib
uses for them, which is almost never the case with Xlib. Change all
involved variables to guint32.
Mikael Magnusson [Tue, 18 Mar 2008 20:51:34 +0000 (21:51 +0100)]
Show the resize popup right away.
Previously, it would wait for a resize step before showing it, when resizing
windows with resize increments that were bigger than the moveresize threshold.
Dana Jansens [Thu, 6 Mar 2008 07:35:26 +0000 (02:35 -0500)]
when a window pops up a child, don't avoid focusing it because you were working in its parent window before this. that's probably what made the window appear in the first place
Dana Jansens [Mon, 3 Mar 2008 16:00:00 +0000 (17:00 +0100)]
use SmSaveGlobal to log out. this will make apps save their documents or whatever so that you don't lose things, but it won't take a snapshot of the current session
Dana Jansens [Sun, 2 Mar 2008 21:11:05 +0000 (16:11 -0500)]
add a cleanup callback to the prompt interface. when the prompt's callback returns TRUE, then the cleanup function is called. likewise when the prompt system is shutdown (openbox is exiting), then the cleanup function is also called. it should unref/destroy the prompt and any memory associated with it