Clean up indentation a bit more.

svn path=/trunk/; revision=31139
This commit is contained in:
Guy Harris 2009-12-01 01:40:37 +00:00
parent a39e0b3afc
commit 1e72ad9469

View file

@ -282,40 +282,40 @@ window_delete_event_cb(GtkWidget *win, GdkEvent *event _U_, gpointer user_data _
void void
window_get_geometry(GtkWidget *widget, window_geometry_t *geom) window_get_geometry(GtkWidget *widget, window_geometry_t *geom)
{ {
gint desk_x, desk_y; gint desk_x, desk_y;
GdkWindowState state; GdkWindowState state;
/* Try to grab our geometry. /* Try to grab our geometry.
GTK+ provides two routines to get a window's position relative GTK+ provides two routines to get a window's position relative
to the X root window. If I understand the documentation correctly, to the X root window. If I understand the documentation correctly,
gdk_window_get_deskrelative_origin applies mainly to Enlightenment gdk_window_get_deskrelative_origin applies mainly to Enlightenment
and gdk_window_get_root_origin applies for all other WMs. and gdk_window_get_root_origin applies for all other WMs.
The code below tries both routines, and picks the one that returns The code below tries both routines, and picks the one that returns
the upper-left-most coordinates. the upper-left-most coordinates.
More info at: More info at:
http://mail.gnome.org/archives/gtk-devel-list/2001-March/msg00289.html http://mail.gnome.org/archives/gtk-devel-list/2001-March/msg00289.html
http://www.gtk.org/faq/#AEN606 http://www.gtk.org/faq/#AEN606
*/ */
gdk_window_get_root_origin(widget->window, gdk_window_get_root_origin(widget->window,
&geom->x, &geom->x,
&geom->y); &geom->y);
if (gdk_window_get_deskrelative_origin(widget->window, if (gdk_window_get_deskrelative_origin(widget->window,
&desk_x, &desk_y)) { &desk_x, &desk_y)) {
if (desk_x <= geom->x && if (desk_x <= geom->x &&
desk_y <= geom->y) desk_y <= geom->y)
{ {
geom->x = desk_x; geom->x = desk_x;
geom->y = desk_y; geom->y = desk_y;
} }
} }
/* XXX - Is this the "approved" method? */ /* XXX - Is this the "approved" method? */
gdk_window_get_size(widget->window, gdk_window_get_size(widget->window,
&geom->width, &geom->width,
&geom->height); &geom->height);