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.
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.
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.
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.
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.