summaryrefslogtreecommitdiff
path: root/openbox/screen.c
AgeCommit message (Collapse)Author
2014-10-11Pass the GravityPoint as const* instead of by valueMikael Magnusson
2014-10-06Move common gravity application to screen.cMikael Magnusson
2014-01-09Fix gcc warnings in screen.cRafael Ignacio Zurita
2013-09-09Add a strict option to the ToggleShowDesktop actionDana Jansens
When the strict option is used, normal windows are not able to show themselves while showing the desktop.
2013-09-01Fix gcc warningsIan Zimmerman
2012-10-06Allow window matching based on the group leader's name and class (Fix bug 5721)Dana Jansens
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-06Use the nearest monitor when the search query rect does not intersect any ↵Dana Jansens
monitor (Fix bug 5500) Previously we would try to find the primary monitor and use that when the search was outside any monitor. However, if the primary monitor is chosen by the mouse position and the mouse is not inside any monitor, we enter infinite recursion trying to find the primary monitor. The nearest monitor is a better metric anyhow, and this ensures screen_find_monitor() is never recursive as it always returns a value without depending on other screen.c methods.
2012-10-06Pick the monitor most relevant to a rectangle more cleverly.Dana Jansens
When monitors overlap (this happens with cloning), we were choosing a monitor to associate with a window, for maximization for example, somewhat arbitrarily. Now we have a more clever algorithm that considers the configured primary monitor first, and that does not prefer monitors based on their sizes, but only how much of the window is in the monitor, excluding parts that were claimed by another monitor already.
2011-10-16Fix maximized windows and such after screen resizingsDana Jansens
2011-10-16Hear screen resizes when they don't change the root window (cloning)Dana Jansens
2011-10-16Propagate _NET_WM_WINDOW_OPACITY to the frame window (bug #5132)Dana Jansens
2011-08-01Fix menu placement to avoid dead xinerama areas, possibly break other stuffMikael Magnusson
Use screen_find_monitor(area) instead of screen_find_monitor_point( topleft corner) in order to find a better monitor when the menu isn't opening with the mouse cursor in the top left corner. I made screen_find_monitor return the primary screen when it failed to find a monitor containing the rect, instead of the total area, no idea what behaviour this will change but I doubt it will be worse.
2011-01-24add function screen_compare_desktops()Dana Jansens
tells if two windows' current desktops are considered logically on the same desktop (taking "all desktops" into account) if a window is on "all desktops" it is considered to be on the current desktop only - windows can only be in one place at a time.
2011-01-24less redundant calls to screen_update_areas() and client_move_onscreen()Dana Jansens
2011-01-24Handle STRING and COMPOUND_TEXT type text properties.Dana Jansens
STRING should be latin1 text (plus TAB and LF) COMPOUND_TEXT should be encoded in the current locale.
2010-09-16Revert "add XFlush to g_timeout callbacks"Dana Jansens
This reverts commit aa3685d16af4a565eecdc39047ee8d140ef5cd99. Mika's commit using a GSource to handle X Events fixes this problem, so this commit is not needed
2010-06-14add XFlush to g_timeout callbacksDana Jansens
GMainLoop doesn't cause an flush to occur after handling a timeout.
2010-06-14Use GMainLoop instead of ObtMainLoopDana Jansens
2010-05-17avoid new gcc warning (casting ** to const** is not valid for good reason)Dana Jansens
2010-04-28make sure clients stay on screen when the root window changes size, and ↵Dana Jansens
maximized/fullscreen windows must be on some monitor or it doesn't make much sense (and asserts)
2010-04-28make an event queue for X events. the queue's min size is 16 XEvents (~3k)Dana Jansens
2010-04-16event_curtime is replaced (publicly) by event_time()Dana Jansens
This function never returns CurrentTime, which is nice, cuz using CurrentTime for XSetFocus always sucks. If the current XEvent did not have a timestamp, then event_time() will find one. It finds the first timestamp available in the X event queue, meaning the earliest timestamp >= the current (nontimestamped) event. All future events should have a timestamp >= event_time(), so using this in XSetFocus() should not mess up any future calls we make to it. This change seems to work well, as it appears to fix bug #3648.
2010-04-16use const Rect* not Rect const*Dana Jansens
2010-03-01add a function client_is_oldfullscreen() that determines if a window is an ↵Dana Jansens
"oldschool fullscreen window" or not. use this throughout. and allow oldschool fullscreen windows to move to 0,0 even with a strut there.
2010-02-12remove a bunch of g_new()/g_free() by returning Rect const*'s from screen ↵Dana Jansens
area functions when possible
2010-02-12using g_slice_new() instead of g_new() part 1Dana Jansens
2010-01-14allow app rules to match windows by their title when mappingDana Jansens
and save the title in the _OB_APP_TITLE property
2010-01-11Merge branch 'backport' into workDana Jansens
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-11More work on refreshing the focus cycle dialog when windows are ↵Dana Jansens
added/removed from the valid focus order
2010-01-11Add _OB_VERSION and _OB_APP_ROLE/CLASS/NAME/TYPEDana Jansens
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-11Redraw the focus cycle popup when the list of focusable windows changes, ↵Dana Jansens
rather than closing it
2009-12-21Set up work for making a 3.5 prerelease.Dana Jansens
Set version stuff to 3.5.0-rc1. Copy the CHANGELOG from 3.4-working. Rename the obt-4.0 and obrender-4.0 pkgconfig stuff to obt-3.5 and obrender-3.5 Rename the "render" directory to "obrender" so that the public headers can be installed in <obrender/*>
2009-12-18Merge branch 'backport' into workDana Jansens
Conflicts: openbox/screen.c
2009-12-18Show the desktop popup as long as the interactive desktop switch is activeDana Jansens
2009-12-17Hide the focus popup if we change desktops and one of the windows in it ↵Dana Jansens
disappears
2009-12-17Don't move focus away from a window if it was focused and it didnt hide when ↵Dana Jansens
switching desktops
2009-12-17Merge branch 'backport' into workDana Jansens
2009-12-17Make the relative desktop switching actions interactiveDana Jansens
The desktop popup can now be shown "permanently" in which case it stays until you tell it to hide.
2009-12-16Calculate the work area using other already existing and better maintained ↵Dana Jansens
and trusted code
2009-12-16Merge branch 'backport' into workDana Jansens
Conflicts: obt/keyboard.c obt/keyboard.h openbox/event.c openbox/menuframe.c openbox/moveresize.c openbox/openbox.c openbox/screen.c
2009-12-15Make the NET_WORKAREA hint work the way it used to, across all monitorsDana Jansens
The spec is not going to change this hint, but rather add a new one. So for now just revert to the old behaviour.
2009-12-14Let menus place themselves on monitors where the mouse is not presentDana Jansens
This fixes a bug which forced menus to show up on the same monitor as the mouse pointer.
2009-12-11Merge branch 'backport' into workDana Jansens
Conflicts: openbox/config.c openbox/event.c openbox/prop.c openbox/prop.h openbox/screen.c openbox/screen.h
2009-12-11Set hints that remember the WM_WINDOW_ROLE and WM_CLASS properties for our ↵Dana Jansens
users. The hints are _OB_ROLE, _OB_NAME, and _OB_CLASS.
2009-12-09Make the desktop popup show on the primary monitor as defined in the config.Dana Jansens
This matches the behaviour of the focus cycle and key chain popups.
2009-12-09Revert "Show desktop switch popup on every monitor"Dana Jansens
This reverts commit 2e1adce628ee3234accc5d88cafb57672800cae0.
2009-12-09Revert "Some fixes for the pager popups, and avoid a crash if you destroy a ↵Dana Jansens
popup while it is going to be shown later by a delay." This reverts commit 33328583a143677d27eb3d081ce66532c3aaca1c.
2009-12-09Add a primaryMonitor config option, where the focus-cycle and keychain ↵Dana Jansens
popups will appear
2009-12-09Bug in choosing the active monitor when doing a move/resizeDana Jansens
2009-12-09When moving focus across desktops, make sure Openbox doesn't think that a ↵Dana Jansens
window which is no longer visible is still focused.