Hello community,

here is the log from the commit of package notify-osd for openSUSE:Factory 
checked in at 2016-11-11 14:35:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/notify-osd (Old)
 and      /work/SRC/openSUSE:Factory/.notify-osd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "notify-osd"

Changes:
--------
--- /work/SRC/openSUSE:Factory/notify-osd/notify-osd.changes    2016-05-10 
09:27:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.notify-osd.new/notify-osd.changes       
2016-11-11 14:35:22.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Nov 10 09:32:16 UTC 2016 - [email protected]
+
+- Add notify-osd-fix-workarea.patch: Fix workarea on Gtk 3.22+.
+
+-------------------------------------------------------------------

New:
----
  notify-osd-fix-workarea.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ notify-osd.spec ++++++
--- /var/tmp/diff_new_pack.C2xQOk/_old  2016-11-11 14:35:23.000000000 +0100
+++ /var/tmp/diff_new_pack.C2xQOk/_new  2016-11-11 14:35:23.000000000 +0100
@@ -27,14 +27,16 @@
 Source:         
http://archive.ubuntu.com/ubuntu/pool/main/n/notify-osd/%{name}_%{_version}.orig.tar.gz
 # PATCH-FEATURE-OPENSUSE notify-osd-leolik.patch -- Extend the configuration 
capabilities, patch by Roman Sukochev (Leolik) from 
https://launchpad.net/~leolik/+archive/leolik.
 Patch0:         %{name}-leolik.patch
+# PATCH-FIX-UPSTREAM notify-osd-fix-workarea.patch [email protected] -- Fix 
workarea on Gtk 3.22+.
+Patch1:         %{name}-fix-workarea.patch
 # PATCH-FIX-UPSTREAM notify-osd-fix-voidreturn.patch [email protected] -- 
Fix value non-return in display.c stack_layout().
-Patch1:         %{name}-fix-voidreturn.patch
+Patch2:         %{name}-fix-voidreturn.patch
 BuildRequires:  autoconf >= 2.59
 BuildRequires:  automake >= 1.8
 BuildRequires:  fdupes
 BuildRequires:  gnome-common
 BuildRequires:  intltool
-BuildRequires:  pkg-config
+BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  pkgconfig(gio-2.0)
 BuildRequires:  pkgconfig(glib-2.0)
@@ -57,15 +59,17 @@
 %setup -q -c
 %patch0
 %patch1 -p1
+%patch2 -p1
 
 %build
-autoreconf -fi
-%configure
-make %{?_smp_mflags}
+NOCONFIGURE=1 gnome-autogen.sh
+%configure \
+  --disable-schemas-compile
+make %{?_smp_mflags} V=1
 
 %install
 %make_install
-%fdupes %{buildroot}%{_datadir}
+%fdupes %{buildroot}%{_datadir}/
 
 %post
 %glib2_gsettings_schema_post

++++++ notify-osd-fix-workarea.patch ++++++
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -1882,19 +1882,30 @@ defaults_get_top_corner (Defaults *self,
 {
        GdkRectangle rect;
        GdkWindow*   active_window    = NULL;
+       GdkDisplay * display;
        GdkDeviceManager* device_manager;
        GdkDevice*   device;
        gint         mx;
        gint         my;
+#if GTK_CHECK_VERSION (3, 22, 0)
+       GdkMonitor * monitor;
+       GdkMonitor * aw_monitor;
+       GdkMonitor * primary_monitor;
+#else
        gint         monitor          = 0;
        gint         aw_monitor;
+       gint         primary_monitor;
+#endif
        gboolean     follow_focus     = defaults_multihead_does_focus_follow 
(self);
        gboolean     is_composited    = FALSE;
-       gint         primary_monitor;
 
        g_return_if_fail (self != NULL && IS_DEFAULTS (self));
 
-       device_manager = gdk_display_get_device_manager 
(gdk_display_get_default ());
+       display = gdk_display_get_default ();
+#if GTK_CHECK_VERSION (3, 22, 0)
+       monitor = gdk_display_get_monitor (display, 0);
+#endif
+       device_manager = gdk_display_get_device_manager (display);
        device = gdk_device_manager_get_client_pointer (device_manager);
        gdk_device_get_position (device, screen, &mx, &my);
 
@@ -1903,13 +1914,23 @@ defaults_get_top_corner (Defaults *self,
        if (follow_focus)
        {
                g_debug ("multi_head_focus_follow mode");
+#if GTK_CHECK_VERSION (3, 22, 0)
+               monitor = gdk_display_get_monitor_at_point (display, mx, my);
+#else
                monitor = gdk_screen_get_monitor_at_point (*screen, mx, my);
+#endif
                active_window = gdk_screen_get_active_window (*screen);
                if (active_window != NULL)
                {
+#if GTK_CHECK_VERSION (3, 22, 0)
+                       aw_monitor = gdk_display_get_monitor_at_window (
+                                       display,
+                                       active_window);
+#else
                        aw_monitor = gdk_screen_get_monitor_at_window (
                                        *screen,
                                        active_window);
+#endif
 
                        if (monitor != aw_monitor)
                        {
@@ -1927,7 +1948,7 @@ defaults_get_top_corner (Defaults *self,
        /* _NET_WORKAREA is always a rectangle spanning all monitors of
         * a screen. As such, it can't properly deal with monitor setups
         * that aren't aligned or have different resolutions.
-        * gdk_screen_get_monitor_workarea() works around this by only
+        * gdk_monitor_get_workarea() works around this by only
         * returning the workarea for the primary screen and the full
         * geometry for all other monitors.
         *
@@ -1937,28 +1958,43 @@ defaults_get_top_corner (Defaults *self,
         * other monitors as well.
         */
 
+#if GTK_CHECK_VERSION (3, 22, 0)
+       primary_monitor = gdk_display_get_primary_monitor (display);
+       if (monitor == primary_monitor)
+       {
+               gdk_monitor_get_workarea (primary_monitor, &rect);
+       }
+#else
        primary_monitor = gdk_screen_get_primary_monitor (*screen);
        if (monitor == primary_monitor)
        {
                gdk_screen_get_monitor_workarea (*screen, primary_monitor, 
&rect);
        }
+#endif
        else
        {
                GdkRectangle workarea;
                GdkRectangle primary_geom;
                gint panel_height;
 
+#if GTK_CHECK_VERSION (3, 22, 0)
+               gdk_monitor_get_workarea (primary_monitor, &workarea);
+               gdk_monitor_get_geometry (primary_monitor, &primary_geom);
+               panel_height = workarea.y - primary_geom.y;
+
+               gdk_monitor_get_geometry (monitor, &rect);
+#else
                gdk_screen_get_monitor_workarea (*screen, primary_monitor, 
&workarea);
                gdk_screen_get_monitor_geometry (*screen, primary_monitor, 
&primary_geom);
                panel_height = workarea.y - primary_geom.y;
 
                gdk_screen_get_monitor_geometry (*screen, monitor, &rect);
+#endif
                rect.y += panel_height;
                rect.height -= panel_height;
        }
 
-       g_debug ("selecting monitor %d at (%d,%d) - %dx%d",
-                monitor,
+       g_debug ("selecting monitor at (%d,%d) - %dx%d",
                 rect.x,
                 rect.y,
                 rect.width,

Reply via email to