[gimp] app: pushed the wrong version of the last commit
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: pushed the wrong version of the last commit
- Date: Sat, 3 May 2014 19:48:12 +0000 (UTC)
commit ff74c76aaceb7ea1680ad419bb8ea478f4172518
Author: Michael Natterer <mitch gimp org>
Date: Sat May 3 21:46:19 2014 +0200
app: pushed the wrong version of the last commit
app/widgets/gimpwidgets-utils.c | 36 +++++++++++++++---------------------
1 files changed, 15 insertions(+), 21 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index 9ce8f20..3d5a415 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -1340,38 +1340,32 @@ gimp_session_write_position (GimpConfigWriter *writer,
gint
gimp_widget_get_monitor (GtkWidget *widget)
{
- GdkWindow *window;
- GdkScreen *screen;
- gint x, y;
+ GdkWindow *window;
+ GdkScreen *screen;
+ GtkAllocation allocation;
+ gint x, y;
g_return_val_if_fail (GTK_IS_WIDGET (widget), 0);
window = gtk_widget_get_window (widget);
- screen = gtk_widget_get_screen (widget);
- if (window)
- {
- GtkAllocation allocation;
+ if (! window)
+ return gimp_get_monitor_at_pointer (&screen);
- gtk_widget_get_allocation (widget, &allocation);
+ screen = gtk_widget_get_screen (widget);
- gdk_window_get_origin (window, &x, &y);
+ gdk_window_get_origin (window, &x, &y);
+ gtk_widget_get_allocation (widget, &allocation);
- if (! gtk_widget_get_has_window (widget))
- {
- x += allocation.x;
- y += allocation.y;
- }
-
- x += allocation.x + allocation.width / 2;
- y += allocation.y + allocation.height / 2;
- }
- else
+ if (! gtk_widget_get_has_window (widget))
{
- gdk_display_get_pointer (gtk_widget_get_display (widget),
- NULL, &x, &y, NULL);
+ x += allocation.x;
+ y += allocation.y;
}
+ x += allocation.width / 2;
+ y += allocation.height / 2;
+
return gdk_screen_get_monitor_at_point (screen, x, y);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]