From 5b012fbc8ac55efc8e1266f01e0e6bfacb4a3516 Mon Sep 17 00:00:00 2001 From: James Fu Date: Thu, 10 Aug 2023 15:58:19 +0800 Subject: [PATCH] rail: fix window freeze when moving window after minimizing and restoring When restoring from minimized state, sometimes MapNotify is received before PropertyNotify, and the rail_state is still WINDOW_SHOW_MINIMIZED. --- client/X11/xf_event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index befbd726b..74411958e 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -3,6 +3,7 @@ * X11 Event Handling * * Copyright 2011 Marc-Andre Moreau + * Copyright 2023 HP Development Company, L.P. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -855,7 +856,7 @@ static BOOL xf_event_MapNotify(xfContext* xfc, const XMapEvent* event, BOOL app) { xfAppWindow* appWindow = xf_AppWindowFromX11Window(xfc, event->window); - if (appWindow && (appWindow->rail_state == WINDOW_SHOW)) + if (appWindow) { /* local restore event */ /* This is now handled as part of the PropertyNotify