[patch] unmap GtkWindow child when iconified
- From: Alexey Spiridonov <lesha netman ru>
- To: gtk-devel-list gnome org
- Subject: [patch] unmap GtkWindow child when iconified
- Date: Wed, 16 Jun 2004 05:30:26 +0400
Hello,
I'm wondering why GtkWindow doesn't unmap its child when it gets unmapped
during iconification. The benefits are clear -- this would make sure that no
cycles are wasted drawing updates that are unnecessary. Here is an attempt
at a patch, adding a few lines to gtk_window_event. Can someone comment
please?
Thanks,
Alexey
--- gtkwindow.c~ 2004-06-15 21:16:33.000000000 -0400
+++ gtkwindow.c 2004-06-15 21:15:08.000000000 -0400
@@ -4051,6 +4051,17 @@
}
}
+ if (event->type == GDK_MAP &&
+ window->bin.child &&
+ GTK_WIDGET_VISIBLE (window->bin.child) &&
+ !GTK_WIDGET_MAPPED (window->bin.child))
+ gtk_widget_map (window->bin.child);
+ if (event->type == GDK_UNMAP &&
+ window->bin.child &&
+ GTK_WIDGET_VISIBLE (window->bin.child) &&
+ GTK_WIDGET_MAPPED (window->bin.child))
+ gtk_widget_unmap (window->bin.child);
+
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]