diff options
author | Richard Grenville <[email protected]> | 2012-09-20 13:50:27 +0800 |
---|---|---|
committer | Richard Grenville <[email protected]> | 2012-09-20 14:11:50 +0800 |
commit | fd0900ef892c97ae51563ac32ebbe895b7fc80a8 (patch) | |
tree | 4730f4c123b90ec441dd3acdd503210bcc1e8b4f /compton.h | |
parent | a08c22945a825eb43607edc7317611c6b6049232 (diff) | |
download | tdebase-fd0900ef892c97ae51563ac32ebbe895b7fc80a8.tar.gz tdebase-fd0900ef892c97ae51563ac32ebbe895b7fc80a8.zip |
Bug fix: Detect and mark WM windows as active
See chjj's comments on issue #39:
https://github.com/chjj/compton/issues/39#issuecomment-8533360
- Add a switch --mark-wmwin-focused that try to detect WM windows and
mark them active.
- Fix a bug that causes BadDrawable, etc. if a window is mapped then
immediately unmapped.
- Fix a bug in determine_evmask().
- Add a debug option DEBUG_CLIENTWIN.
- Force window repaint on window frame extent change.
- Code cleanup.
Diffstat (limited to 'compton.h')
-rw-r--r-- | compton.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -34,6 +34,7 @@ // #define DEBUG_EVENTS 1 // #define DEBUG_RESTACK 1 // #define DEBUG_WINTYPE 1 +// #define DEBUG_CLIENTWIN 1 // #define MONITOR_REPAINT 1 // For printing timestamps @@ -488,11 +489,7 @@ static Window find_client_win(Display *dpy, Window w); static void -get_frame_extents(Display *dpy, Window w, - unsigned int *left, - unsigned int *right, - unsigned int *top, - unsigned int *bottom); +get_frame_extents(Display *dpy, win *w, Window client); static win * paint_preprocess(Display *dpy, win *list); @@ -543,6 +540,13 @@ calc_opacity(Display *dpy, win *w, Bool refetch_prop); static void calc_dim(Display *dpy, win *w); +static inline void +set_focused(Display *dpy, win *w, Bool focused) { + w->focused = focused; + calc_opacity(dpy, w, False); + calc_dim(dpy, w); +} + static void determine_fade(Display *dpy, win *w); |