summaryrefslogtreecommitdiff
path: root/src/tools/metacity-mag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/metacity-mag.c')
-rw-r--r--src/tools/metacity-mag.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/tools/metacity-mag.c b/src/tools/metacity-mag.c
index 7c5cb3e9..22c7cc3d 100644
--- a/src/tools/metacity-mag.c
+++ b/src/tools/metacity-mag.c
@@ -77,13 +77,16 @@ static gboolean
regrab_idle (GtkWidget *image)
{
GdkPixbuf *magnified;
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (image, &allocation);
- if (image->allocation.width != last_grab_allocation.width ||
- image->allocation.height != last_grab_allocation.height)
+ if (allocation.width != last_grab_allocation.width ||
+ allocation.height != last_grab_allocation.height)
{
- last_grab_width = rint (image->allocation.width / width_factor);
- last_grab_height = rint (image->allocation.height / height_factor);
- last_grab_allocation = image->allocation;
+ last_grab_width = rint (allocation.width / width_factor);
+ last_grab_height = rint (allocation.height / height_factor);
+ last_grab_allocation = allocation;
magnified = get_pixbuf ();
@@ -234,7 +237,7 @@ begin_area_grab (void)
gtk_widget_show (grab_widget);
}
- if (gdk_keyboard_grab (grab_widget->window,
+ if (gdk_keyboard_grab (gtk_widget_get_window (grab_widget),
FALSE,
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
{
@@ -242,7 +245,7 @@ begin_area_grab (void)
return;
}
- if (gdk_pointer_grab (grab_widget->window,
+ if (gdk_pointer_grab (gtk_widget_get_window (grab_widget),
FALSE,
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
NULL,