Commit graph

7306 commits

Author SHA1 Message Date
Dana Jansens
80b6d4ac5d XML_PARSE_XINCLUDE flag seems to do nothing. Use xmlXIncludeProcessFlags() instead 2011-01-24 14:19:23 -05:00
Dana Jansens
c5c34cca1c if no launch time is provided for an application, make one up.
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-24 14:19:23 -05:00
Dana Jansens
5e38690d65 fix segfault for placing windows without a group 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
Mikael Magnusson
74f7f35b59 Fix small leak in If action option parsing 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
76ae19924d add function screen_compare_desktops()
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-24 14:19:22 -05:00
Dana Jansens
4ce98ecf02 don't steal focus if someone used a window within 1 second ago
(instead of 0.5 seconds)
2011-01-24 14:19:22 -05:00
Dana Jansens
8ac60401e9 Fixing commit 066a15d7aa64eaa0. Don't ever use CurrentTime as event_curtime.
Force event_curtime to be some valid timestamp.
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
6dedf8f37e use top_builddir, not builddir variable in Makefile. seems builddir doesn't always exist/anymore 2011-01-24 14:19:22 -05:00
Dana Jansens
a21e9c9cc5 add some more warning flags for debug builds
-Wno-write-strings so that "foo" is treated as a const char* not a char*.
-Wextra for more fun
2011-01-24 14:19:22 -05:00
Hiltjo Posthuma
6e5de3b57e Fix icons.c test for 64-bit platforms 2011-01-24 14:19:22 -05:00
Dana Jansens
a8843b58c5 update the last user interaction timestamp during a move/resize of the focused window 2011-01-24 14:19:22 -05:00
Dana Jansens
5ff0d07aba update the user-interaction timestamp when running a (non-interactive) action on the focused window
update it at the end of running actions instead of multiple times (once for
 each action)
2011-01-24 14:19:22 -05:00
Dana Jansens
d614bebf6a don't steal focus from a window if it was used very recently, when someone uses _NET_ACTIVE request. 2011-01-24 14:19:22 -05:00
Dana Jansens
e737150701 mem leak in config.c 2011-01-24 14:19:22 -05:00
Dana Jansens
001f174cf5 Big rework of image.c and the image cache system.
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-24 14:19:22 -05:00
Mikael Magnusson
f458d66c7e Use >= instead of > when comparing timestamps, or we will ignore some events 2011-01-24 14:19:22 -05:00
Dana Jansens
b1fc19711f add some tests for obt pieces (binary search, .desktop parsking, linkbase, and inotify watch) 2011-01-24 14:19:22 -05:00
Dana Jansens
7eeae03f06 oops, crash if searching for something smaller than * in the array 2011-01-24 14:19:22 -05:00
Dana Jansens
d3660704f1 less redundant calls to screen_update_areas() and client_move_onscreen() 2011-01-24 14:19:22 -05:00
Mikael Magnusson
6f92931f84 Ignore MotionNotify on menus, it reset the submenudelay timer
It also caused the slightest cursor movement to activate the entry under
the cursor when navigating via the keyboard.
2011-01-24 14:19:22 -05:00
Mikael Magnusson
6d0f44e1d1 Use g_list_find instead of weird bouncing loops 2011-01-24 14:19:22 -05:00
Dana Jansens
3ff4162034 Parse multiple keys in one keybind 2011-01-24 14:19:22 -05:00
Dana Jansens
36a437a702 allow the res_class in WM_CLASS to mark a window as a dock app, if it is set to the string "DockApp" 2011-01-24 14:19:21 -05:00
Mikael Magnusson
194bb32cf6 Don't hog the user during the hideDelay 2011-01-24 14:19:21 -05:00
Dana Jansens
5d5714f01e Handle STRING and COMPOUND_TEXT type text properties.
STRING should be latin1 text (plus TAB and LF)
COMPOUND_TEXT should be encoded in the current locale.
2011-01-24 14:19:21 -05:00
Dana Jansens
d3d96b572a Revert "add an inotify watcher for directories (doesnt work without inotify yet)"
This reverts commit c36b89ba12.
2011-01-24 14:18:09 -05:00
Dana Jansens
27ae9d65c8 fix make distcheck 2010-10-04 17:36:08 -04:00
Dana Jansens
2813d2c161 glib can't handle -Wcast-qual 2010-09-16 14:52:09 -04:00
Dana Jansens
d81f94bf8b add wmhints test that toggles motif decor hints on a mapped window 2010-09-16 13:50:37 -04:00
Mikael Magnusson
9fcf466aeb Fix a double free when you have a mousebind without a button attribute
Introduced in f307a3feab
2010-09-16 17:24:12 +02:00
Mikael Magnusson
670ff8b4b8 Fix a copypasto that broke interactive keybinds with meta and hyper keys 2010-09-16 17:24:12 +02:00
Dana Jansens
624ffe397b Revert "add XFlush to g_timeout callbacks"
This reverts commit aa3685d16a.

Mika's commit using a GSource to handle X Events fixes this problem, so this
commit is not needed
2010-09-16 17:24:12 +02:00
Mikael Magnusson
179312f9ae Fix 3.4 compatibility for SendToDesktop 2010-09-16 17:24:11 +02:00
Mikael Magnusson
eafcc06030 Correct typo occured -> occurred in function name 2010-09-16 17:24:11 +02:00
Dana Jansens
1666d285d7 Add signal handling with the GMainLoop
Provided through a very simplistic interface in obt, found in the
 obt/signal.[ch] files
2010-09-16 17:24:11 +02:00
Dana Jansens
b79b70620f add stackabove test, that lets you move a client window just above a specified window in the stacking order 2010-09-16 17:24:11 +02:00
Dana Jansens
6865e538a3 80 cols 2010-09-16 17:24:11 +02:00
Mikael Magnusson
a4a5fc866d Continue parsing contexts when an unsupported one is encountered 2010-09-16 17:24:11 +02:00
Mikael Magnusson
1ffc002132 Make the dock a context and add actions LowerDock and RaiseDock 2010-09-16 17:24:11 +02:00
Mikael Magnusson
48d36cd587 Move usage of iconh into the branch that assigns it 2010-06-26 13:55:41 +02:00
Mikael Magnusson
128909214a settings can't be NULL here, or we'd have already crashed anyway 2010-06-26 13:46:55 +02:00
Mikael Magnusson
a1bb01c92e Use a gsource instead of gio channels for watching x events
Fixes not getting some focusin events sometimes.
2010-06-25 13:08:00 +02:00
Dana Jansens
de7c3f466f obt returns libxml2 structures directly, so anyone linking against it better also link to libxml2 2010-06-16 13:26:11 -04:00
Dana Jansens
aa3685d16a add XFlush to g_timeout callbacks
GMainLoop doesn't cause an flush to occur after handling a timeout.
2010-06-14 13:52:21 -04:00
Dana Jansens
79cf72d17f Fix the EXTENTS reported on window frames.
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-14 12:40:15 -04:00
Dana Jansens
e1a51bdf10 keep stacking_list_tail a pointer to the tail of the stacking list 2010-06-14 12:19:01 -04:00
Dana Jansens
6d95e2441a allow a user to set "undecorated" on a window without decorations
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-06-14 12:19:01 -04:00