From: Paul Cornett Date: Thu, 8 Nov 2007 19:22:23 +0000 (+0000) Subject: fix for blank client area after restoring a "rolled up" tlw X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/27242d8503a5417d7db97b104b05847feafb2d0e fix for blank client area after restoring a "rolled up" tlw git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index de88a66586..462ec86004 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -366,13 +366,20 @@ gtk_frame_map_callback( GtkWidget* widget, win->m_width = rect.width; win->m_height = rect.height; decorSize = size; - wxSizeEvent event(win->GetSize(), win->GetId()); - event.SetEventObject(win); - win->GetEventHandler()->ProcessEvent(event); } } win->SetIconizeState(false); + + // Because GetClientSize() returns (0,0) when IsIconized() is true, + // a size event must be sent here, just in case GetClientSize() was + // called while iconized. + // This specifically happens when restoring a tlw that was "rolled up" + // with some WMs. + wxSizeEvent event(win->GetSize(), win->GetId()); + event.SetEventObject(win); + win->GetEventHandler()->ProcessEvent(event); + return false; } }