XFWM4 Window Problems, Part Deux
Olivier Fourdan
fourdan at xfce.org
Wed Nov 15 13:21:03 CET 2006
Milosz,
> * Testcase Code:
> http://futurepast.free.fr/iconify-present.c
Yes, indeed, the test code shows the behavior you describe. But it works
equally bad in KWin 3.0 (Qt: 3.3.4/KDE: 3.3.2) and metacity 2.8.8.
The problem lies in gtk+, and that explains why others's (who may not share the
same version of gtk+) don't see the problem.
You're rightfully calling gtk_window_present (); but in the gtk version you're
using, it doesn't de-iconify the window.
To make it work with gtk+ 2.10.6, you need to add gtk_widget_show() prior to
calling gtk_window_present ().
Why that? I do not know... Better ask on gtk-devel list. The thing is that all
window managers I've tried behave like xfwm4 in this regard.
The offending code in gtk+2.10.6 is in gtkwindow.c:
void
gtk_window_present_with_time (GtkWindow *window,
guint32 timestamp)
{
GtkWidget *widget;
g_return_if_fail (GTK_IS_WINDOW (window));
widget = GTK_WIDGET (window);
if (GTK_WIDGET_VISIBLE (window))
{
g_assert (widget->window != NULL);
gdk_window_show (widget->window);
/* Translate a timestamp of GDK_CURRENT_TIME appropriately */
if (timestamp == GDK_CURRENT_TIME)
{
#ifdef GDK_WINDOWING_X11
GdkDisplay *display;
display = gtk_widget_get_display (GTK_WIDGET (window));
timestamp = gdk_x11_display_get_user_time (display);
#else
timestamp = gtk_get_current_event_time ();
#endif
}
gdk_window_focus (widget->window, timestamp);
}
else
{
gtk_widget_show (widget);
}
}
It seems that, for some reason, in gtk+-2.10.6, GTK_WIDGET_VISIBLE (window) is
true when the window is iconified, so that gtk_widget_show (widget); is not
called...
[...]
> The result was that the window started to shrink once mapped, until it could
> shrink no more (to the smallest possible size XFWM4 would allow itself.)
That's another old thread that was discussed and explained on the mailing list.
It seems you have yet to understand the explanation. But that's absolutely not
related to the problem you report.
[...]
> // Gee, i hope this doesn't shrink, as Mr. Fourdan said
> // that one shouldn't use set_size_request () on
> // a GtkWindow. Oh yeah. There was also something with
I never said that like that, I gave you the explanation, you were not calling
the gtk+ function properly... Of course you can call
gtk_widget_set_size_request() on a top level window. Seems that you
misunderstood, again.
You are trying really hard to push the debate on a personal level, I won't
follow you there, sorry. From some reason that I fail to understand, you keep a
gripe against me, xfwm4 or probably both...
> If you think you have enough of those points then, well, maybe you have some
> credit from OS-cillation (commercial) and Hewlett-Packard (commercial), but
> if you just keep ignoring testcases and checks from non-commercial [...]
Pure nonsense, I'm not getting any support one none of these companies. I'm
really, really, not interested in pursuing that discussion with you, sorry.
EOT, as far as I'm concerned.
Cheers,
Olivier.
More information about the Xfce4-dev
mailing list