Commit graph

7387 commits

Author SHA1 Message Date
Dana Jansens
2acbf04cb4 Move focus to a window when the mouse enters a window during a pointer grab, if using "focus under mouse" (Fixes bug #4617) 2011-01-24 14:19:23 -05:00
Dana Jansens
29d595b178 when focus=yes in the per-app settings, then the focus request for the new window is from a user. also if allow_other_desktops is false, then always disallow other desktops (Fixes bug #4752) 2011-01-24 14:19:23 -05:00
Dana Jansens
385967b552 Make NET_ACTIVE messages always treated as from the user. Loosen up focus 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-24 14:19:23 -05:00
Dana Jansens
d291a9c7aa don't use -Wextra unless --enable-super-warnings 2011-01-24 14:19:23 -05:00
Philip Brown
d082572b17 setenv and unsetenv dont exist in Solaris 9. (Fixes bug #4663)
Seeing as how you already use glib, I just substituted g_setenv and g_unsetenv
as appropriate, and it now works for me.
2011-01-24 14:19:23 -05:00
Philip Brown
9c356d370a Some versions of X, have the Shape extension, but apparently not "ShapeInput" (Fixes bug #4662)
the sawfish window manager has ifdefs for this sort of situation.
I followed suit, and #ifdef'd it, and it now works for me.
patch attached.

Slight changes to the patch from danakj@orodu.net for readability
2011-01-24 14:19:23 -05:00
Dana Jansens
7c33f45e09 make the default drag threshold 1. it is smooth and feels and looks nice.
(also macos has it and i liked it.)
2011-01-24 14:19:23 -05:00
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
Mikael Magnusson
da5441ecec Fix g_slice_new0 call 2010-10-14 15:58:41 +02:00
Dana Jansens
a621e7a4fc fix 80 cols and clean up the button color loading function 2010-10-14 15:54:48 +02:00
Dave Foster
95ed843702 cleaning up remnants of bad rebase merges and modernizing some sections 2010-10-14 15:54:48 +02:00
Dave Foster
464ee8996e Menu bullet color support. 2010-10-14 15:54:48 +02:00
Dave Foster
3c8840a6cc Make the btn textures use their own image color. 2010-10-14 15:54:47 +02:00
Dave Foster
8058df3f7c Buttons seem to work! 2010-10-14 15:54:47 +02:00
Dave Foster
5d7c022bb4 (non-working) Getting theme started. Button textures read to the right place. 2010-10-14 15:54:47 +02:00
Dave Foster
f250c9dc2b Button structure. 2010-10-14 15:54:47 +02:00
Dave Foster
0ae3388b6a Button proper freeing/newing. 2010-10-14 15:54:47 +02:00
Dave Foster
6d30d66efb Adding RrButton to libobrender, ref counted appearances. 2010-10-14 15:54:44 +02:00
Dave Foster
b566d3fcfe Another way of getting at button-*.toggled.unpressed (no unpressed needed). 2010-10-14 15:49:20 +02:00
Dave Foster
9bc70d9373 Rearranged all button appearance reading for logical purposes, better defaults. 2010-10-14 15:49:20 +02:00
Dave Foster
ef8108695f Found a bug in one of the specialized button textures. 2010-10-14 15:49:20 +02:00
Dave Foster
ccd4d460e5 Need to allocate appearances! 2010-10-14 15:49:20 +02:00