Less flashin for in-process plug/socket
- From: Alex Larsson <alexl redhat com>
- To: gtk-devel-list gnome org
- Cc: otaylor redhat com
- Subject: Less flashin for in-process plug/socket
- Date: Sun, 21 Apr 2002 13:42:47 -0400 (EDT)
As discussed with owen on irc, this patch fixes flashing for in-process
plug/sockets when adding the plug to the socket.
Index: gdk/x11/gdkwindow-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkwindow-x11.c,v
retrieving revision 1.147
diff -u -p -r1.147 gdkwindow-x11.c
--- gdk/x11/gdkwindow-x11.c 4 Apr 2002 23:10:58 -0000 1.147
+++ gdk/x11/gdkwindow-x11.c 21 Apr 2002 17:37:25 -0000
@@ -1251,6 +1251,9 @@ gdk_window_reparent (GdkWindow *window,
GDK_WINDOW_XID (new_parent),
x, y);
+ window_private->x = x;
+ window_private->y = y;
+
/* From here on, we treat parents of type GDK_WINDOW_FOREIGN like
* the root window
*/
Index: gtk/gtkplug.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkplug.c,v
retrieving revision 1.46
diff -u -p -r1.46 gtkplug.c
--- gtk/gtkplug.c 24 Feb 2002 01:52:13 -0000 1.46
+++ gtk/gtkplug.c 21 Apr 2002 17:37:25 -0000
@@ -217,6 +217,7 @@ _gtk_plug_add_to_socket (GtkPlug *plug
GtkSocket *socket)
{
GtkWidget *widget;
+ gint w, h;
g_return_if_fail (GTK_IS_PLUG (plug));
g_return_if_fail (GTK_IS_SOCKET (socket));
@@ -231,8 +232,10 @@ _gtk_plug_add_to_socket (GtkPlug *plug
plug->socket_window = GTK_WIDGET (socket)->window;
- if (GTK_WIDGET_REALIZED (widget))
- gdk_window_reparent (widget->window, plug->socket_window, 0, 0);
+ if (GTK_WIDGET_REALIZED (widget)) {
+ gdk_drawable_get_size (GDK_DRAWABLE (widget->window), &w, &h);
+ gdk_window_reparent (widget->window, plug->socket_window, -w, -h);
+ }
gtk_widget_set_parent (widget, GTK_WIDGET (socket));
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a leather-clad flyboy senator with no name. She's a scantily clad mutant
detective from aristocratic European stock. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]