mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] wayland: fix deadlock when using wayland:warpSupport=no
This commit is contained in:
parent
f0ea882165
commit
22bbc2457e
@ -344,16 +344,19 @@ void waylandGrabPointer(void)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void waylandUngrabPointer(void)
|
inline static void internalUngrabPointer(bool lock)
|
||||||
{
|
{
|
||||||
INTERLOCKED_SECTION(wlWm.confineLock,
|
if (lock)
|
||||||
|
LG_LOCK(wlWm.confineLock);
|
||||||
|
|
||||||
|
if (wlWm.confinedPointer)
|
||||||
{
|
{
|
||||||
if (wlWm.confinedPointer)
|
zwp_confined_pointer_v1_destroy(wlWm.confinedPointer);
|
||||||
{
|
wlWm.confinedPointer = NULL;
|
||||||
zwp_confined_pointer_v1_destroy(wlWm.confinedPointer);
|
}
|
||||||
wlWm.confinedPointer = NULL;
|
|
||||||
}
|
if (lock)
|
||||||
});
|
LG_UNLOCK(wlWm.confineLock);
|
||||||
|
|
||||||
if (!wlWm.warpSupport)
|
if (!wlWm.warpSupport)
|
||||||
{
|
{
|
||||||
@ -371,6 +374,11 @@ void waylandUngrabPointer(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void waylandUngrabPointer(void)
|
||||||
|
{
|
||||||
|
internalUngrabPointer(true);
|
||||||
|
}
|
||||||
|
|
||||||
void waylandCapturePointer(void)
|
void waylandCapturePointer(void)
|
||||||
{
|
{
|
||||||
if (!wlWm.warpSupport)
|
if (!wlWm.warpSupport)
|
||||||
@ -411,9 +419,7 @@ void waylandUncapturePointer(void)
|
|||||||
* - if the user has opted to use captureInputOnly mode.
|
* - if the user has opted to use captureInputOnly mode.
|
||||||
*/
|
*/
|
||||||
if (!wlWm.warpSupport || !app_isFormatValid() || app_isCaptureOnlyMode())
|
if (!wlWm.warpSupport || !app_isFormatValid() || app_isCaptureOnlyMode())
|
||||||
{
|
internalUngrabPointer(false);
|
||||||
waylandUngrabPointer();
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wlWm.confinedPointer = zwp_pointer_constraints_v1_confine_pointer(
|
wlWm.confinedPointer = zwp_pointer_constraints_v1_confine_pointer(
|
||||||
|
Loading…
Reference in New Issue
Block a user