Format changes from r34265 to fit a 80 column wide window.

svn path=/trunk/; revision=34268
This commit is contained in:
Stephen Fisher 2010-09-27 21:23:29 +00:00
parent 6bf3129f17
commit 2c3fe49a03

View file

@ -338,17 +338,20 @@ window_set_geometry(GtkWidget *widget, window_geometry_t *geom)
/* as we now have the geometry from the recent file, set it */
/* if the window was minimized, x and y are -32000 (at least on Win32) */
if (geom->set_pos && geom->x != -32000 && geom->y != -32000) {
/* Per Wireshark bug #553, GTK has a problem on MS Windows where
* the upper-left corner of the window may appear off screen when
* when a single desktop spans multiple monitors of different
* resolutions and positions relative to each other.
/* Per Wireshark bug #553, GTK has a problem on MS Windows
* where the upper-left corner of the window may appear off
* screen when when a single desktop spans multiple monitors
* of different resolutions and positions relative to each
* other.
*
* If the requested (x,y) position isn't within the monitor's
* viewable area, change it to the viewable area's (0,0). */
default_screen = gdk_screen_get_default();
monitor_num = gdk_screen_get_monitor_at_point(default_screen, geom->x, geom->y);
gdk_screen_get_monitor_geometry(default_screen, monitor_num, &viewable_area);
monitor_num = gdk_screen_get_monitor_at_point(default_screen,
geom->x, geom->y);
gdk_screen_get_monitor_geometry(default_screen, monitor_num,
&viewable_area);
if(geom->x < viewable_area.x || geom->x > viewable_area.width)
geom->x = viewable_area.x;