linux-capture: Watch for VisibilityNotify events
Some window managers like i3 don't issue Expose events when switching between workspaces, but send VisibilityNotify events. This causes the stream to freeze even when the workspace is switched back. Related issue: #863master
parent
91c292d394
commit
f4a8137412
|
@ -267,6 +267,9 @@ namespace XCompcap
|
|||
if (ev.type == Expose)
|
||||
changedWindows.insert(ev.xexpose.window);
|
||||
|
||||
if (ev.type == VisibilityNotify)
|
||||
changedWindows.insert(ev.xvisibility.window);
|
||||
|
||||
if (ev.type == DestroyNotify)
|
||||
changedWindows.insert(ev.xdestroywindow.event);
|
||||
}
|
||||
|
|
|
@ -318,7 +318,10 @@ void XCompcapMain::updateSettings(obs_data_t *settings)
|
|||
}
|
||||
|
||||
if (p->win)
|
||||
XSelectInput(xdisp, p->win, StructureNotifyMask | ExposureMask);
|
||||
XSelectInput(xdisp, p->win,
|
||||
StructureNotifyMask
|
||||
| ExposureMask
|
||||
| VisibilityChangeMask);
|
||||
XSync(xdisp, 0);
|
||||
|
||||
XWindowAttributes attr;
|
||||
|
|
Loading…
Reference in New Issue