1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-18 13:55:36 -05:00

Bug fix #57: Fix incorrect handling of InputOnly windows

- Stop rendering InputOnly windows. In the past I've misunderstood the
  whole thing, I guess, sorry. Thanks to garfilth and funeral1988 for
  reporting and providing valuable information.

- Fix a possible segfault in DDEBUG_EVENTS.

- Add "dbe" as a configuration file option.

- Attempt to slightly reduce the rendering delay after VSync in non-DBE
  mode. I don't think, however, that this would be greatly helpful for
  the tearing issue.
This commit is contained in:
Richard Grenville 2012-10-27 21:46:01 +08:00
parent 66e615775b
commit f83ed19e14
2 changed files with 18 additions and 4 deletions

View file

@ -32,9 +32,10 @@ fade-out-step = 0.03;
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = false;
detect-client-opacity = true;
refresh-rate = 0;
vsync = "none";
dbe = false;
paint-on-overlay = true;
sw-opti = false;

View file

@ -784,6 +784,13 @@ win_match_once(win *w, const wincond *cond) {
cond);
#endif
if (InputOnly == w->a.class) {
#ifdef DEBUG_WINMATCH
printf(": InputOnly\n");
#endif
return false;
}
// Determine the target
target = NULL;
switch (cond->target) {
@ -1710,6 +1717,10 @@ paint_all(Display *dpy, XserverRegion region, win *t) {
XFixesDestroyRegion(dpy, reg_tmp);
XFixesDestroyRegion(dpy, reg_tmp2);
// Do this as early as possible
if (!opts.dbe)
XFixesSetPictureClipRegion(dpy, tgt_buffer, 0, 0, None);
// Wait for VBlank
vsync_wait();
@ -1724,7 +1735,6 @@ paint_all(Display *dpy, XserverRegion region, win *t) {
}
// No-DBE painting mode
else if (tgt_buffer != tgt_picture) {
XFixesSetPictureClipRegion(dpy, tgt_buffer, 0, 0, None);
XRenderComposite(
dpy, PictOpSrc, tgt_buffer, None,
tgt_picture, 0, 0, 0, 0,
@ -1819,7 +1829,8 @@ map_win(Display *dpy, Window id,
Bool override_redirect) {
win *w = find_win(dpy, id);
if (!w) return;
// Don't care about window mapping if it's an InputOnly window
if (!w || InputOnly == w->a.class) return;
reg_ignore_expire = True;
@ -3167,7 +3178,7 @@ ev_handle(XEvent *ev) {
if (!w)
w = find_toplevel(dpy, wid);
if (w->name)
if (w && w->name)
window_name = w->name;
else
to_free = (Bool) wid_get_name(dpy, wid, &window_name);
@ -3686,6 +3697,8 @@ parse_config(char *cpath, struct options_tmp *pcfgtmp) {
parse_vsync(sval);
// --alpha-step
config_lookup_float(&cfg, "alpha-step", &opts.alpha_step);
// --dbe
lcfg_lookup_bool(&cfg, "dbe", &opts.dbe);
// --paint-on-overlay
lcfg_lookup_bool(&cfg, "paint-on-overlay", &opts.paint_on_overlay);
// --sw-opti