do not avoid to queue for a resize if the container is not visible, we
Wed Jun 24 16:38:02 1998 Tim Janik <timj@gtk.org> * gtk/gtkbin.c (gtk_bin_remove): do not avoid to queue for a resize if the container is not visible, we might be a toplevel! this holds for all other base container implementations as well, that are candidates to derive toplevels from. in general the resizing code will care about visibility itself. * gtk/gtkmenushell.c (gtk_menu_shell_remove): likewise. * gtk/gtkbox.c (gtk_box_remove): likewise. * gtk/gtkwindow.c (gtk_window_move_resize): save ->use_uposition around gtk_window_set_hints(), since we haven't calculated the new position yet. * gdk/gdkwindow.c (gdk_window_get_pointer): take care that *x, *y and *mask are alway initialized in a sane way, regardless of the return value.
This commit is contained in:
@ -1285,7 +1285,8 @@ gdk_window_get_origin (GdkWindow *window,
|
||||
GdkWindowPrivate *private;
|
||||
gint return_val;
|
||||
Window child;
|
||||
gint tx, ty;
|
||||
gint tx = 0;
|
||||
gint ty = 0;
|
||||
|
||||
g_return_val_if_fail (window != NULL, 0);
|
||||
|
||||
@ -1299,14 +1300,15 @@ gdk_window_get_origin (GdkWindow *window,
|
||||
0, 0, &tx, &ty,
|
||||
&child);
|
||||
|
||||
if (x)
|
||||
*x = tx;
|
||||
if (y)
|
||||
*y = ty;
|
||||
}
|
||||
else
|
||||
return_val = 0;
|
||||
|
||||
if (x)
|
||||
*x = tx;
|
||||
if (y)
|
||||
*y = ty;
|
||||
|
||||
return return_val;
|
||||
}
|
||||
|
||||
@ -1321,8 +1323,9 @@ gdk_window_get_pointer (GdkWindow *window,
|
||||
Window root;
|
||||
Window child;
|
||||
int rootx, rooty;
|
||||
int winx, winy;
|
||||
unsigned int xmask;
|
||||
int winx = 0;
|
||||
int winy = 0;
|
||||
unsigned int xmask = 0;
|
||||
|
||||
if (!window)
|
||||
window = (GdkWindow*) &gdk_root_parent;
|
||||
@ -1334,14 +1337,17 @@ gdk_window_get_pointer (GdkWindow *window,
|
||||
XQueryPointer (private->xdisplay, private->xwindow, &root, &child,
|
||||
&rootx, &rooty, &winx, &winy, &xmask))
|
||||
{
|
||||
if (x) *x = winx;
|
||||
if (y) *y = winy;
|
||||
if (mask) *mask = xmask;
|
||||
|
||||
if (child)
|
||||
return_val = gdk_window_lookup (child);
|
||||
}
|
||||
|
||||
if (x)
|
||||
*x = winx;
|
||||
if (y)
|
||||
*y = winy;
|
||||
if (mask)
|
||||
*mask = xmask;
|
||||
|
||||
return return_val;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user