Wayland: slightly better infinite drag release logic.

This commit is contained in:
Alex Shvartzkop 2023-09-18 17:42:09 +03:00
parent 6b68d2c946
commit b6c0a3f60c
1 changed files with 8 additions and 7 deletions

View File

@ -539,16 +539,17 @@ void KIPLATFORM::UI::InfiniteDragReleaseWindow()
{
wxLogTrace( traceWayland, wxS( "InfiniteDragReleaseWindow" ) );
if( s_wl_confined_pointer == NULL )
if( s_wl_confined_pointer )
{
return;
zwp_confined_pointer_v1_destroy( s_wl_confined_pointer );
s_wl_confined_pointer = NULL;
}
zwp_confined_pointer_v1_destroy( s_wl_confined_pointer );
if( s_wl_confinement_region )
{
wl_region_destroy( s_wl_confinement_region );
s_wl_confined_pointer = NULL;
s_wl_confinement_region = NULL;
}
};