Yes the new code works perfectly fine here and is a better solution. My
original thought was to use pure Gtk but i forgot about gdk_ and only
looked for something like gtk_window_get_state - which i couldn't find :-).

On Thu, May 18, 2017 at 8:37 PM, zeljko via Lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> On 18.05.2017 13:38, Marc Weustink via Lazarus wrote:
>
>> zeljko via Lazarus wrote:
>>
>>> On 18.05.2017 01:43, Kostas Michalopoulos via Lazarus 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 ?
>>>
>>
>> I prefer using the gtk/gdk functions and avoid getting (win)controls
>> from the widgetsets
>>
>
> I've removed workaround introduced in r54958 with pure gdk/gtk
> implementation in r54975.
> Please guys test, since I cannot reproduce problem here (even without any
> patch): Fedora 24 64bit, KDE Plasma (kwin is window manager).
> I need info from users from Mint 16..18 and Cinnamon DE which uses mutter
> or metacity if this finally fixes problem.
> Positive feedback = merge to 1.8RC2
>
> Important note: Gtk2 changes window state in async mode under x11, so
> statement like this won't work (it works ok under qt or win32) and you can
> expect problems with such code :)
>
> with TForm2.Create(Self) do
> begin
>   Show;
>   LCLIntf.ShowWindow(Handle, SW_SHOWMAXIMIZED);
>   LCLIntf.ShowWindow(Handle, SW_RESTORE);
> end;
>
>
> zeljko
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus@lists.lazarus-ide.org
> http://lists.lazarus-ide.org/listinfo/lazarus
>
-- 
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to