mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 14:21:57 +00:00
[client] x11: prevent skew from enter/leave/focus and fullscreen events
This commit is contained in:
parent
9f6ad864ed
commit
3e08e7aafa
1 changed files with 8 additions and 0 deletions
|
@ -741,6 +741,8 @@ static int x11EventThread(void * unused)
|
||||||
|
|
||||||
if (xe.xproperty.atom == x11atoms._NET_WM_STATE)
|
if (xe.xproperty.atom == x11atoms._NET_WM_STATE)
|
||||||
{
|
{
|
||||||
|
atomic_store(&x11.lastWMEvent, microtime());
|
||||||
|
|
||||||
Atom type;
|
Atom type;
|
||||||
int fmt;
|
int fmt;
|
||||||
unsigned long num, bytes;
|
unsigned long num, bytes;
|
||||||
|
@ -766,6 +768,8 @@ static int x11EventThread(void * unused)
|
||||||
|
|
||||||
if (xe.xproperty.atom == x11atoms._NET_FRAME_EXTENTS)
|
if (xe.xproperty.atom == x11atoms._NET_FRAME_EXTENTS)
|
||||||
{
|
{
|
||||||
|
atomic_store(&x11.lastWMEvent, microtime());
|
||||||
|
|
||||||
Atom type;
|
Atom type;
|
||||||
int fmt;
|
int fmt;
|
||||||
unsigned long num, bytes;
|
unsigned long num, bytes;
|
||||||
|
@ -804,6 +808,7 @@ static void x11XInputEvent(XGenericEventCookie *cookie)
|
||||||
{
|
{
|
||||||
case XI_FocusIn:
|
case XI_FocusIn:
|
||||||
{
|
{
|
||||||
|
atomic_store(&x11.lastWMEvent, microtime());
|
||||||
if (x11.focused)
|
if (x11.focused)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -821,6 +826,7 @@ static void x11XInputEvent(XGenericEventCookie *cookie)
|
||||||
|
|
||||||
case XI_FocusOut:
|
case XI_FocusOut:
|
||||||
{
|
{
|
||||||
|
atomic_store(&x11.lastWMEvent, microtime());
|
||||||
if (!x11.focused)
|
if (!x11.focused)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -838,6 +844,7 @@ static void x11XInputEvent(XGenericEventCookie *cookie)
|
||||||
|
|
||||||
case XI_Enter:
|
case XI_Enter:
|
||||||
{
|
{
|
||||||
|
atomic_store(&x11.lastWMEvent, microtime());
|
||||||
XIEnterEvent *xie = cookie->data;
|
XIEnterEvent *xie = cookie->data;
|
||||||
if (x11.entered || xie->event != x11.window)
|
if (x11.entered || xie->event != x11.window)
|
||||||
return;
|
return;
|
||||||
|
@ -850,6 +857,7 @@ static void x11XInputEvent(XGenericEventCookie *cookie)
|
||||||
|
|
||||||
case XI_Leave:
|
case XI_Leave:
|
||||||
{
|
{
|
||||||
|
atomic_store(&x11.lastWMEvent, microtime());
|
||||||
XILeaveEvent *xie = cookie->data;
|
XILeaveEvent *xie = cookie->data;
|
||||||
if (!x11.entered || xie->event != x11.window ||
|
if (!x11.entered || xie->event != x11.window ||
|
||||||
button_state != 0 || app_isCaptureMode())
|
button_state != 0 || app_isCaptureMode())
|
||||||
|
|
Loading…
Reference in a new issue