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.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user