From: Dmitry A. Kazakov on
On Fri, 10 Nov 2006 22:14:25 +0100, Michael Bode wrote:

> "Dmitry A. Kazakov" <mailbox(a)dmitry-kazakov.de> writes:
>
>> Though GTK+ performs quite poorly on Windows platform.
>
> How? For me it works quite well.

Did you try tree view under Windows, for example? I did, a lot. There are
numerous problems with it. For instance, refresh does not work well upon
resizing of panes containing tree views.

Do you have X-sever (cygnus) and a Linux host? Compile your Ada application
on Linux and start it side-by-side once remotely under X-sever once
natively. The difference between X11 and Windows GTK will become obvious.

>> And overall, when its documentation tells you that you fundamentally
>> cannot save and restore the position of a window, what could you
>> say?
>
> Get toplevel window position from a widget:
>
> declare
> Gwin : Gdk.Window.Gdk_Window;
> X, Y : Glib.Gint;
> begin
> Gwin := Gtk.Widget.Get_Window (Get_Toplevel (Widget));
> Gdk.Window.Get_Position (Gwin, X, Y);
> end;
>
> Set toplevel position:
> Gtk.Widget.Set_UPosition (Widget, X, Y);

I only quoted GTK+ documentation. GtkAda's one repeats it:

https://libre2.adacore.com/GtkAda/docs/2.8/gtkada_rm/gtk-window.html

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Dmitry A. Kazakov on
On Fri, 10 Nov 2006 23:40:23 +0100, Pascal Obry wrote:

> Dmitry A. Kazakov a ?crit :
>
>> Though GTK+ performs quite poorly on Windows platform. And overall, when
>
> GPS manages to work pretty well on Windows and it is using GtkAda. It
> uses to perform poorly, but things have improved a lot since a year or so.

True. I hope they will continue so. The next step could be to stop talking
about "GTK+ for Win32," as a *separate* project on their home page!

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Michael Bode on
"Dmitry A. Kazakov" <mailbox(a)dmitry-kazakov.de> writes:

> Did you try tree view under Windows, for example? I did, a lot. There are
> numerous problems with it. For instance, refresh does not work well upon
> resizing of panes containing tree views.
> I only quoted GTK+ documentation. GtkAda's one repeats it:
>
> https://libre2.adacore.com/GtkAda/docs/2.8/gtkada_rm/gtk-window.html

Do yo refer to this paragraph?

If you are saving and restoring your application's window positions,
you should know that it's impossible for applications to do this
without getting it somewhat wrong because applications do not have
sufficient knowledge of window manager state. The Correct Mechanism
is to support the session management protocol (see the "GnomeClient"
object in the GNOME libraries for example) and allow the window
manager to save your window sizes and positions.

This says it is not a GTK+ problem but a X11 / window manager
problem. If this is true no X11 toolkit can do something about it.

What I've seen is this:

Set_UPosition seems to set the position of the whole window including
border an title bar. Get_Position seems to return the position of the
client area of the window. If your desktop has a panel on the top of
the root window, you get another offset. You can compare the results
of the GTK functions with the output of xwininfo.

--
Michael Bode