summaryrefslogtreecommitdiff
path: root/openbox/client.c
AgeCommit message (Collapse)Author
2024-11-12fix list access crashHEADmasternavewindre
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-02Allow FillToEdge to grow when all its edges are blocked.Dana Jansens
This change points out how useless the return value from client_find_resize_directional() was, so it also removes that. When all edges are blocked, the FillToEdge action will try to grow all four edges agin without blocking any of them on their current edge. This more closely matches the behaviour of the GrowToEdge action.
2013-09-02Clean up the FillToEdge action implementationDana Jansens
This extend the client_find_resize_directional() method to support two growing modes, and return a bool for whether it was able to grow/shrink. The client_find_resize_directional() method now takes an enum instead of a bool, with two growing modes. The old mode which always tries to grow, the a new mode that will only grow if the client's edge is not already at a grow stopping point (ie against the edge of another window).
2013-09-01Fix gcc warningsIan Zimmerman
2013-08-19Add window type to If as wellMikael Magnusson
This one required some extra helpers so is separate commit
2012-10-06Allow application rules to control window size (Fix bug 4661)Dana Jansens
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-06Get the window's title in the fake-managed case since we apply app rule ↵Dana Jansens
matching (Fix bug 5277)
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-06Make LeastOverlap placment replace the behaviour of Smart and address style nitsDana Jansens
2012-09-30Allow client destroy notify functions to be removed based on the data ↵Dana Jansens
associated with them.
2012-09-30Ignore enters on windows that are raised over focused window while being mapped.Dana Jansens
2011-10-16Fix window width/height going less than 1 on some platforms (bug #5246)Dana Jansens
2011-10-16make undecorated windows place according to their undecorated state (bug #5179)Dana Jansens
splits client_setup_decor_and_functions() into 3 functions. 1. add client_setup_default_decor_and_functions() - called from client_get_all() to get the maximum decor/functions that will be available for use by the client. 2. add client_setup_decor_undecorated() - sets up the client's undecorarted decor if the flag is set by the per-app settings or session state. - we do this before setting up the frame so the frame reflects the window as it should be when getting placed. 3. client_setup_decor_and_functions() - calls the above 2 to perform the same functions as before. - added to client_apply_startup_state() so that we can ensure it was run fully at least once in the mapping process, since it is not called in client_get_all() anymore.
2011-10-16Propagate _NET_WM_WINDOW_OPACITY to the frame window (bug #5132)Dana Jansens
2011-10-05Consistency with helper/modal windows and multiple desktops.Dana Jansens
When focusing a window, bring its helper windows. This happened before when switching its desktop, but if you have 2 windows on different desktops and switch between them, the helpers should come to both when they are being used. When a new helper/modal window maps on a different desktop and you are using the application, then the helper/modal window is moved to the current desktop to be with the application you are using.
2011-10-05Fix focus stealing for changing desktops/Use timestamp for user input eventsDana Jansens
Change the logic for when to allow stealing focus across desktops. - It was possible to call event_time_after() with a CurrentTime in the old code. - It would disallow a user requested change which is crazy. - It would change desktops on you when a new window appeared but this is generally not desirable. event_source_time() is supposed to give the time which the user made things happen. we leave it at 0 for user-input events right now which means stuff like changing desktop doesn't save any timestamp at all. we should use the timestamp from x for user-generated events.
2011-05-13Fix Java apps always appearing on desktop 0.Dana Jansens
Fake managing a window doesn't read a requested desktop, but ended up placing a NET_WM_DESKTOP hint on the window (with value 0). Fake managing doesn't need to set the DESKTOP hint since the window is not actually being managed, so remove it from the codepath.
2011-01-24Resizing removes maximization now, so don't only snap "grow to edge" to ↵Dana Jansens
screen edges. This caused a serious annoyance when shrinking a maximized window, it would shrink to the other end of the monitor, effectively reducing it to its minimum size.
2011-01-24cap the client (and frame) window's dimensions at the range of an unsigned ↵Dana Jansens
short (bug #4596)
2011-01-24when focus=yes in the per-app settings, then the focus request for the new ↵Dana Jansens
window is from a user. also if allow_other_desktops is false, then always disallow other desktops (Fixes bug #4752)
2011-01-24Make NET_ACTIVE messages always treated as from the user. Loosen up focus ↵Dana Jansens
stealing for user-requested focusing. Seems panels such as xfce's and gnome's still treat their activation requests as being from an application when a user has requested it. Make the focus stealing code more lenient for user-requested focusings (_NET_ACTIVE). But treat new windows as not user-requested unless they gave a launch time. When activating a window, if another window would be the one to actually get focused, then activate that instead (avoid clicking a window in the panel and nothing happens).
2011-01-24if no launch time is provided for an application, make one up.Dana Jansens
if the window is related to other existing windows and one of those windows was the last used then we will give it a launch time equal to the last user time, which will end up giving the window focus probably. else the window is related to other windows, but you are not working in them? seems suspicious, so we will give it a launch time of NOW - STEAL_INTERVAL, so it will be given focus only if we didn't use something else during the steal interval. else the window is all on its own, so we can't judge it. give it a launch time equal to the last user time, so it will probably take focus. this way running things from a terminal will give them focus, but popups without a launch time shouldn't steal focus so easily.
2011-01-24Big changes to placement across multiple monitors.Dana Jansens
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-24don't steal focus from a window if it was used very recently, when someone ↵Dana Jansens
uses _NET_ACTIVE request.
2011-01-24Big rework of image.c and the image cache system.Dana Jansens
Added a lot of comments, simplified call graphs. Added full (not second-class) support for images coming from named sources (files, icon themes). RrImage holds an RrImageSet. RrImageSet holds a bunch of RrImagePic, which are different sizes of a logical image. RrImageSet objects can be merged if it is discovered they (will) share an RrImagePic. The RrImage objects are updated to use the new merged RrImageSet.
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-06-26settings can't be NULL here, or we'd have already crashed anywayMikael Magnusson
2010-06-14Fix the EXTENTS reported on window frames.Dana Jansens
Change the order things are done on map, so we apply startup state without any states set first, thus getting all the functions possible for the window type etc. then change the order states are applied, as some remove the ability to apply others (ie fullscreen comes last). Add an oldsize to ObFrame that remembers the size of the frame last reported to the world through the EXTENTS property. If you frame_adjust_area(FAKE) then frame_adjust_area(NONFAKE), the EXTENTS would not be updated since the oldsize wasn't remembered across fake updates. Make the extentsrequest test ask about windows with states set also.
2010-06-14allow a user to set "undecorated" on a window without decorationsDana Jansens
if not based on window type, the app may decide to have decorations again sometime. this was not always legal but chromium has made it so.
2010-05-21allow new windows on other desktops to get focused if specified in a per-app ↵Dana Jansens
rule you can not client_active() with user=false and desktop=true and activate things on other desktops, by the general focus steal restrictions, if you wanted to do that sorta thing
2010-05-20don't need a force_reply when changing the decor for a windowDana Jansens
it will send a configurenotify if the client's rootwindow position changed
2010-05-20allows a window to unmax by resizing.Dana Jansens
makes "clever" use of the client's pre_max_area values to allow this to happen without flashing, and preserving them in case the user cancels the resize after it has become unmaximized.
2010-04-28fix XSYNCronization of resizes (especially with two monitors).Dana Jansens
1) a ConfigureNotify must always follow a Sync notification 2) determine the final size of the window with its position else struts are not applied properly for (partly) maximized windows 3) set the sync counter to a value when managing a new window
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-28Remove two unused variablesMikael Magnusson
Remains from 64adc0eeba598cb1469b2140777fba30e3053f0e
2010-04-28make an event queue for X events. the queue's min size is 16 XEvents (~3k)Dana Jansens
2010-04-20don't change stacking stuff on windows when moving them during the unmanage ↵Dana Jansens
phase.
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-16When determining the current timestamp, try get something a lil more accurateDana Jansens
Get the first timestamp from the event queue, rather than (potentially) the last. also treat it as the actual event_curtime, meaning it is used when focusing a newly mapped window etc.
2010-04-16add an option to next/previous window to only include ↵Dana Jansens
hilited/flashing/urgent windows (feature req/bug #4341)
2010-04-16use const Rect* not Rect const*Dana Jansens
2010-03-29if a launch time isnt there (like for client_activate) assume the window ↵Dana Jansens
launched before the last desktop switch, not after. ie don't change desktops if you're not sure.
2010-03-25allow non-normal windows to go to 0,0. and remove a debugging g_printDana 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-03-01when an app tries to move to 0,0 and there is a strut there (java swing!), ↵Dana Jansens
move it to inside the strut instead (unless it is an oldschool fullscreen app)
2010-02-16a couple more g_free() to g_slice_free()'sDana Jansens
2010-02-16missed a g_free() that should be g_slice_free()Dana Jansens
2010-02-15dont trust the _NET_ACTIVE_WINDOW timestamp. (fixes bug #4519)Dana Jansens
if we decide to focus the window, do not use their provided timestamp. chromium gives a very old timestamp, which means we think we're focusing the window but it never actually gets focus, leading to inconsistent behaviour by openbox. use the timestamp for making decisions about passing focus if you want (we dont right now), but not for the XSetInputFocus call.
2010-02-12remove a bunch of g_new()/g_free() by returning Rect const*'s from screen ↵Dana Jansens
area functions when possible