aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/gui_utils.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2012-10-05 14:51:31 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2012-10-05 14:51:31 +0000
commitb436d64d555456f882aae43dafc6ec86e89b5815 (patch)
tree194ccaa0cad29f9ee0945ed2fb8aa1c47c08247b /ui/gtk/gui_utils.c
parent9bcae55a34779b74d9a9c125539d25bf3891ef22 (diff)
A minor modification to Stephen Fisher's r34265 patch to [attempt to] resolve bug 553. This change takes into account that viewable_area.[x|y] may not be 0,0. Will this finally fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=553 ?Unknown, but I am unable to reproduce it.
svn path=/trunk/; revision=45331
Diffstat (limited to 'ui/gtk/gui_utils.c')
-rw-r--r--ui/gtk/gui_utils.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/ui/gtk/gui_utils.c b/ui/gtk/gui_utils.c
index c26af483ec..fb429c83aa 100644
--- a/ui/gtk/gui_utils.c
+++ b/ui/gtk/gui_utils.c
@@ -376,18 +376,16 @@ window_set_geometry(GtkWidget *widget,
* other.
*
* If the requested (x,y) position isn't within the monitor's
- * viewable area, change it to the viewable area's (0,0). */
-
+ * viewable area, change it to the viewable area's (x,y). */
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);
-
- if(geom->x < viewable_area.x || geom->x > viewable_area.width)
+ if(geom->x < viewable_area.x || geom->x > (viewable_area.x + viewable_area.width))
geom->x = viewable_area.x;
- if(geom->y < viewable_area.y || geom->y > viewable_area.height)
+ if(geom->y < viewable_area.y || geom->y > (viewable_area.y + viewable_area.height))
geom->y = viewable_area.y;
gtk_window_move(GTK_WINDOW(widget),
@@ -709,8 +707,8 @@ pipe_timer_cb(gpointer data)
handle = (HANDLE)_get_osfhandle(pipe_input->source);
result = PeekNamedPipe(handle, NULL, 0, NULL, &avail, NULL);
- /* Get the child process exit status */
- GetExitCodeProcess((HANDLE)*(pipe_input->child_process), &childstatus);
+ /* Get the child process exit status */
+ GetExitCodeProcess((HANDLE)*(pipe_input->child_process), &childstatus);
/* If the Peek returned an error, or there are bytes to be read
or the childwatcher thread has terminated then call the normal