mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[client,x11] fix rail checks
rail might be deactivated during connect, so ensure that the default session rendering path properly checks the window pointer
This commit is contained in:
@@ -295,7 +295,13 @@ void xf_draw_screen_(xfContext* xfc, int x, int y, int w, int h, const char* fkt
|
||||
|
||||
if (w == 0 || h == 0)
|
||||
{
|
||||
WLog_WARN(TAG, "invalid width and/or height specified: w=%d h=%d", w, h);
|
||||
WLog_WARN(TAG, "[%s] invalid width and/or height specified: w=%d h=%d", __FUNCTION__, w, h);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!xfc->window)
|
||||
{
|
||||
WLog_WARN(TAG, "[%s] invalid xfc->window=%p", __FUNCTION__, xfc->window);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -638,7 +638,7 @@ static BOOL xf_event_FocusIn(xfContext* xfc, const XFocusInEvent* event, BOOL ap
|
||||
|
||||
/* Release all keys, should already be done at FocusOut but might be missed
|
||||
* if the WM decided to use an alternate event order */
|
||||
if (!xfc->remote_app)
|
||||
if (!app)
|
||||
xf_keyboard_release_all_keypress(xfc);
|
||||
|
||||
xf_pointer_update_scale(xfc);
|
||||
@@ -878,7 +878,7 @@ static BOOL xf_event_UnmapNotify(xfContext* xfc, const XUnmapEvent* event, BOOL
|
||||
WINPR_ASSERT(xfc);
|
||||
WINPR_ASSERT(event);
|
||||
|
||||
if (!xfc->remote_app)
|
||||
if (!app)
|
||||
xf_keyboard_release_all_keypress(xfc);
|
||||
|
||||
if (!app)
|
||||
|
||||
@@ -319,7 +319,7 @@ int xf_keyboard_read_keyboard_state(xfContext* xfc)
|
||||
Window wdummy;
|
||||
UINT32 state = 0;
|
||||
|
||||
if (!xfc->remote_app)
|
||||
if (!xfc->remote_app && xfc->window)
|
||||
{
|
||||
XQueryPointer(xfc->display, xfc->window->handle, &wdummy, &wdummy, &dummy, &dummy, &dummy,
|
||||
&dummy, &state);
|
||||
@@ -448,7 +448,7 @@ void xf_keyboard_focus_in(xfContext* xfc)
|
||||
|
||||
/* finish with a mouse pointer position like mstsc.exe if required */
|
||||
|
||||
if (xfc->remote_app)
|
||||
if (xfc->remote_app || !xfc->window)
|
||||
return;
|
||||
|
||||
if (XQueryPointer(xfc->display, xfc->window->handle, &w, &w, &d, &d, &x, &y, &state))
|
||||
|
||||
Reference in New Issue
Block a user