[Lazarus] Patch for fixing the window resizes when switching components

zeljko zeljko at holobit.net
Thu May 18 14:17:04 CEST 2017


On 18.05.2017 13:43, Mattias Gaertner via Lazarus wrote:
> On Thu, 18 May 2017 13:20:52 +0200
> zeljko via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
>
>> [...]
>> if GDK_IS_WINDOW(PGtkWindow(OurWidget)^.window) and
>> (gdk_window_get_state(PGtkWindow(OurWidget)^.window) =
>> GDK_WINDOW_STATE_MAXIMIZED) then
>>    gtk_window_unmaximize() ...
>> Same for unfullscreen and other "un" routines which we use inside that
>> procedure.
>>
>> What other devels think about this ? Should I correct that patch in this
>> way and fix future problems with eg gtk_window_unfullscreen() which
>> isn't covered by this patch atm ?
>
> Your solution looks more correct. But since this issue can only be
> reproduced on some systems, can you test it?


Just attached new patch which checks if our GdkWindow is toplevel, so 
it's correct now. Tested on Fedora 24 gtk2 64bit and it works for me :)
IMHO, nothing bad can happen with this patch since we check at the 
beginning if window is mapped or not, so there's nothing to 
unmaximize,unfullscreen or uniconify without mapped GdkWindow.

zeljko





More information about the Lazarus mailing list