comparison gtk3/dw.c @ 1470:a317c2ec1d4c

On GTK2 gtk_window_move() needs to be called after mapping the window... but before calling gdk_window_get_frame_extents() so do it in another step. Also a couple minor code fixes on GTK2 and GTK3.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 20 Dec 2011 14:30:10 +0000
parents b9efb744cfbd
children 26dbd11399d6
comparison
equal deleted inserted replaced
1469:b9efb744cfbd 1470:a317c2ec1d4c
8757 8757
8758 /* Get the frame size */ 8758 /* Get the frame size */
8759 gdk_window_get_frame_extents(window, &frame); 8759 gdk_window_get_frame_extents(window, &frame);
8760 width = frame.width; 8760 width = frame.width;
8761 height = frame.height; 8761 height = frame.height;
8762 } 8762 }
8763 } 8763 }
8764 else 8764 else
8765 { 8765 {
8766 int cx , cy; 8766 int cx , cy;
8767 8767
8782 g_object_set_data(G_OBJECT(handle), "_dw_y", GINT_TO_POINTER(y)); 8782 g_object_set_data(G_OBJECT(handle), "_dw_y", GINT_TO_POINTER(y));
8783 g_object_set_data(G_OBJECT(handle), "_dw_pos", GINT_TO_POINTER(1)); 8783 g_object_set_data(G_OBJECT(handle), "_dw_pos", GINT_TO_POINTER(1));
8784 /* Check to see if there is a pending size request too */ 8784 /* Check to see if there is a pending size request too */
8785 width = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(handle), "_dw_width")); 8785 width = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(handle), "_dw_width"));
8786 height = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(handle), "_dw_height")); 8786 height = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(handle), "_dw_height"));
8787 if(width | height) 8787 if(!width || !height)
8788 { 8788 {
8789 /* Ask what GTK is planning on suggesting for the window size */ 8789 /* Ask what GTK is planning on suggesting for the window size */
8790 gtk_window_get_size(GTK_WINDOW(handle), !width ? &width : NULL, !height ? &height : NULL); 8790 gtk_window_get_size(GTK_WINDOW(handle), !width ? &width : NULL, !height ? &height : NULL);
8791 } 8791 }
8792 /* Add the frame size to it */ 8792 /* Add the frame size to it */