On Sat, 05 Nov 2005 16:52:05 +0100
dannym <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Am Samstag, den 05.11.2005, 14:08 +0100 schrieb Mattias Gaertner:
> > On Fri, 04 Nov 2005 20:25:46 +0100
> > dannym <[EMAIL PROTECTED]> wrote:
> >
> > > hi,
> > >
> > > patch attached.
> > >
> > > btw I'm not entirely sure if that ought to be split into multiple
> > > events, but my gut feeling says no (probably prejudice by gtk
> > > experience :)).
> > >
> > > I changed the event name to comply with mostly every other event (i.e.
> > > OnHide, not OnHidden, likewise OnWindowStateChange, not
> > > OnWindowStateChanged :))
> >
> > Thanks. Applied with modifications:
> > - it works only under gtk2
>
> yeah, I suspected but did not verify that. Sorry :)
>
> > - for Delphi compatibility a WMSize message must be sent
> > - the interface should never call directly an LCL event. Always call an
> > LCL function, so that overriding and notification is possible.
> > - Should also work now for win32
> >
> >
> > Mattias
>
> I reviewed your GTKWindowStateEventCB, and I'm not sure if you want it
> to do what it does now :)
>
> you have:
> if (GDK_WINDOW_STATE_MAXIMIZED and state^.new_window_state)>0
> then
> SizeMsg.SizeType:=SIZEFULLSCREEN
> else if (GDK_WINDOW_STATE_ICONIFIED and
> state^.new_window_state)>0 then
> SizeMsg.SizeType:=SIZEICONIC
>
> that means, when a window is maximized and later iconified (i.e. a
> iconified window, that was maximized at the time when it was not yet
> iconified), you will set sizetype to SIZEFULLSCREEN anyways.
Ah.
> (Not sure if that can happen, but ...)
>
> And note that at least in gtk terminology, fullscreen and maximized are
> completely different.
>
> For maximized, the window manager determines some maximum window size
> (i.e. as big as possible, but
> - not spanning over more than one screen
> - not covering the panel and taskbar and whatever else sets "struts"
> ).
>
> For fullscreen, it will remove the window border, set always on top and
> use the total screen area for the window.
>
> note,
> The EventWindowState structure is like this:
> changed_mask
> contains a bitmask of the states that have _changed_
> new_window_state
> contains a bitmask of the state itself (i.e. like fWindowState
> already does, but the state _at the time of the event_)
>
> Anyways, as I said, maybe it's alright like it is but just wanted to
> note it in case it isn't.
I'm no gtk2 expert. Can you fix the flags?
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives