Merge pull request #4568 from akallabeth/rails_bad_window_fix

Check for window existence in remote app mode before access
This commit is contained in:
David Fort 2018-04-12 15:25:35 +02:00 committed by GitHub
commit 81ea42098f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -828,6 +828,15 @@ static BOOL xf_event_PropertyNotify(xfContext* xfc, XEvent* event, BOOL app)
unsigned long nitems;
unsigned long bytes;
unsigned char* prop;
xfAppWindow* appWindow = NULL;
if (app)
{
appWindow = xf_AppWindowFromX11Window(xfc, event->xany.window);
if (!appWindow)
return TRUE;
}
if ((Atom) event->xproperty.atom == xfc->_NET_WM_STATE)
{
@ -875,12 +884,6 @@ static BOOL xf_event_PropertyNotify(xfContext* xfc, XEvent* event, BOOL app)
if (app)
{
xfAppWindow* appWindow;
appWindow = xf_AppWindowFromX11Window(xfc, event->xany.window);
if (!appWindow)
return TRUE;
if (maxVert && maxHorz && !minimized
&& (appWindow->rail_state != WINDOW_SHOW_MAXIMIZED))
{