Hello community, here is the log from the commit of package notify-osd for openSUSE:Factory checked in at 2015-02-13 08:35:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2014-12-21 12:04:12.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.notify-osd.new/notify-osd.changes 2015-02-13 08:35:44.000000000 +0100 @@ -1,0 +2,10 @@ +Fri Feb 13 04:21:55 UTC 2015 - [email protected] + +- Update to 0.9.35~bzr20150126: + * Fix some deprecation warnings. + * Some improvements: + + Fix incorrect parameter in widget draw event function. + + Use G_DEFINE_TYPE_WITH_PRIVATE. +- Rebase notify-osd-leolik.patch. + +------------------------------------------------------------------- Old: ---- notify-osd_0.9.35+14.10.20140819.orig.tar.gz New: ---- notify-osd_0.9.35+15.04.20150126.orig.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ notify-osd.spec ++++++ --- /var/tmp/diff_new_pack.Wgmlm8/_old 2015-02-13 08:35:44.000000000 +0100 +++ /var/tmp/diff_new_pack.Wgmlm8/_new 2015-02-13 08:35:44.000000000 +0100 @@ -16,9 +16,9 @@ # -%define _version 0.9.35+14.10.20140819 +%define _version 0.9.35+15.04.20150126 Name: notify-osd -Version: 0.9.35~bzr20140819 +Version: 0.9.35~bzr20150126 Release: 0 Summary: Streamlined Notification Daemon License: GPL-3.0+ @@ -27,8 +27,8 @@ Source: http://archive.ubuntu.com/ubuntu/pool/main/n/notify-osd/%{name}_%{_version}.orig.tar.gz # PATCH-FEATURE-UPSTREAM notify-osd-leolik.patch -- Extend the configuration capabilities, patch by Roman Sukochev (Leolik). Taken from https://launchpad.net/~leolik/+archive/leolik. Note that upstream didn't accept this patch. Patch0: notify-osd-leolik.patch -BuildRequires: autoconf -BuildRequires: automake +BuildRequires: autoconf >= 2.59 +BuildRequires: automake >= 1.8 BuildRequires: fdupes BuildRequires: gnome-common BuildRequires: intltool ++++++ notify-osd-leolik.patch ++++++ --- /var/tmp/diff_new_pack.Wgmlm8/_old 2015-02-13 08:35:44.000000000 +0100 +++ /var/tmp/diff_new_pack.Wgmlm8/_new 2015-02-13 08:35:44.000000000 +0100 @@ -1,7 +1,7 @@ diff -ruN src_old/bubble.c src/bubble.c ---- src_old/bubble.c 2014-02-13 19:54:04.000000000 +0400 -+++ src/bubble.c 2014-04-20 16:36:17.000000000 +0400 -@@ -136,25 +136,25 @@ +--- src_old/bubble.c ++++ src/bubble.c +@@ -133,25 +133,25 @@ // FIXME: this is in class Defaults already, but not yet hooked up so for the // moment we use the macros here, these values reflect the visual-guideline // for jaunty notifications @@ -41,7 +41,7 @@ #define INDICATOR_UNLIT_R 1.0f #define INDICATOR_UNLIT_G 1.0f -@@ -175,6 +175,10 @@ +@@ -172,6 +172,10 @@ #define BUBBLE_CONTENT_BLUR_RADIUS 4 #define TEXT_DROP_SHADOW_SIZE 2 @@ -52,7 +52,7 @@ //-- private functions --------------------------------------------------------- static guint g_bubble_signals[LAST_SIGNAL] = { 0 }; -@@ -735,17 +739,32 @@ +@@ -732,17 +736,32 @@ 2.0f * EM2PIXELS (get_shadow_size (self), d)); cairo_fill (cr); cairo_set_operator (cr, CAIRO_OPERATOR_OVER); @@ -94,7 +94,7 @@ draw_round_rect ( cr, -@@ -1646,15 +1665,23 @@ +@@ -1643,15 +1662,23 @@ // sanity check if (!window) return; @@ -125,7 +125,7 @@ } static void -@@ -1744,7 +1771,7 @@ +@@ -1738,7 +1765,7 @@ cairo_paint (cr); cairo_set_operator (cr, CAIRO_OPERATOR_OVER); @@ -134,7 +134,7 @@ { // render drop-shadow and bubble-background _render_background (bubble, cr, 1.0f, 0.0f); -@@ -1777,6 +1804,29 @@ +@@ -1769,6 +1796,29 @@ } static gboolean @@ -142,7 +142,7 @@ + GdkEventButton* event, + Bubble* bubble) +{ -+ BubblePrivate *priv = GET_PRIVATE (bubble); ++ BubblePrivate *priv = bubble->priv; + + if (priv->mouse_over && event->button == 1) + { @@ -164,16 +164,16 @@ redraw_handler (Bubble* bubble) { GtkWindow* window; -@@ -1800,7 +1850,7 @@ +@@ -1792,7 +1842,7 @@ if (priv->alpha == NULL) { - if (priv->distance < 1.0f && !priv->prevent_fade) + if (priv->distance < 1.0f && !priv->prevent_fade && BUBBLE_PREVENT_FADE) { - gtk_window_set_opacity (window, + gtk_widget_set_opacity (priv->widget, WINDOW_MIN_OPACITY + -@@ -1955,7 +2005,7 @@ +@@ -1956,7 +2006,7 @@ // mark mouse-pointer having left bubble and proximity-area // after inital show-up of bubble @@ -182,9 +182,9 @@ priv->prevent_fade = FALSE; } -@@ -2251,6 +2301,14 @@ - G_CALLBACK (expose_handler), - this); +@@ -2252,6 +2302,14 @@ + G_CALLBACK (bubble_draw), + this); + if (BUBBLE_CLOSE_ON_CLICK) + { @@ -197,16 +197,16 @@ // "clear" input-mask, set title/icon/attributes gtk_widget_set_app_paintable (window, TRUE); gtk_window_set_title (GTK_WINDOW (window), "notify-osd"); -@@ -2730,7 +2788,7 @@ +@@ -2731,7 +2789,7 @@ - priv = GET_PRIVATE (self); + priv = self->priv; - if (priv->prevent_fade) + if (BUBBLE_PREVENT_FADE && priv->prevent_fade) return FALSE; return priv->mouse_over; -@@ -2834,7 +2892,7 @@ +@@ -2835,7 +2893,7 @@ // check if mouse-pointer is over bubble (and proximity-area) initially pointer_update (self); @@ -215,7 +215,7 @@ priv->prevent_fade = TRUE; else priv->prevent_fade = FALSE; -@@ -3397,6 +3455,8 @@ +@@ -3398,6 +3456,8 @@ gint old_bubble_height = 0; gint new_bubble_width = 0; gint new_bubble_height = 0; @@ -224,7 +224,7 @@ Defaults* d; BubblePrivate* priv; -@@ -3591,6 +3651,13 @@ +@@ -3592,6 +3652,13 @@ _refresh_body (self); update_shape (self); @@ -239,8 +239,8 @@ void diff -ruN src_old/defaults.c src/defaults.c ---- src_old/defaults.c 2014-02-13 19:54:26.000000000 +0400 -+++ src/defaults.c 2014-04-20 17:35:51.226067000 +0400 +--- src_old/defaults.c ++++ src/defaults.c @@ -104,40 +104,41 @@ /* these values are interpreted as em-measurements and do comply to the * visual guide for jaunty-notifications */ @@ -346,8 +346,8 @@ defaults_get_desktop_bottom_gap (Defaults* self) { diff -ruN src_old/defaults.h src/defaults.h ---- src_old/defaults.h 2014-02-13 19:54:26.000000000 +0400 -+++ src/defaults.h 2014-04-20 17:35:16.910066000 +0400 +--- src_old/defaults.h ++++ src/defaults.h @@ -59,7 +59,13 @@ { GRAVITY_NONE = 0, @@ -372,8 +372,8 @@ gdouble stack_height; gdouble bubble_vert_gap; diff -ruN src_old/display.c src/display.c ---- src_old/display.c 2014-02-13 19:54:04.000000000 +0400 -+++ src/display.c 2014-04-20 16:36:17.000000000 +0400 +--- src_old/display.c ++++ src/display.c @@ -314,8 +314,10 @@ return FALSE; } @@ -386,8 +386,8 @@ defaults_get_top_corner (self->defaults, &screen, &x, &y); diff -ruN src_old/main.c src/main.c ---- src_old/main.c 2014-02-13 19:54:04.000000000 +0400 -+++ src/main.c 2014-04-20 16:36:17.000000000 +0400 +--- src_old/main.c ++++ src/main.c @@ -25,6 +25,10 @@ ** with this program. If not, see <http://www.gnu.org/licenses/>. ** @@ -613,7 +613,7 @@ int main (int argc, char** argv) -@@ -58,6 +269,8 @@ +@@ -57,6 +268,8 @@ gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), ICONS_DIR); @@ -623,8 +623,8 @@ observer = observer_new (); stack = stack_new (defaults, observer); diff -ruN src_old/stack.c src/stack.c ---- src_old/stack.c 2014-02-13 19:54:04.000000000 +0400 -+++ src/stack.c 2014-04-20 16:36:17.000000000 +0400 +--- src_old/stack.c ++++ src/stack.c @@ -44,6 +44,7 @@ G_DEFINE_TYPE (Stack, stack, G_TYPE_OBJECT); @@ -637,33 +637,41 @@ if (body) bubble_set_message_body (bubble, body); -+ if (timeout == NOTIFY_EXPIRES_DEFAULT) { -+ bubble_set_timeout (bubble, -+ defaults_get_on_screen_timeout (self->defaults)); -+ } -+ else { -+ bubble_set_timeout (bubble, timeout); -+ } -+ ++ if (timeout == NOTIFY_EXPIRES_DEFAULT) { ++ bubble_set_timeout (bubble, ++ defaults_get_on_screen_timeout (self->defaults)); ++ } ++ else ++ { ++ bubble_set_timeout (bubble, timeout); ++ } + if (new_bubble && bubble_is_append_allowed(bubble)) { app_bubble = find_bubble_for_append(self, bubble); -@@ -958,8 +968,7 @@ +@@ -958,8 +968,54 @@ case SLOT_ALLOCATION_FIXED: *y += EM2PIXELS (defaults_get_icon_size (d), d) + 2 * EM2PIXELS (defaults_get_margin_size (d), d) + - EM2PIXELS (defaults_get_bubble_vert_gap (d), d); /* + - 2 * EM2PIXELS (defaults_get_bubble_shadow_size (d, is_composited), d);*/ + EM2PIXELS (defaults_get_bubble_vert_gap (d), d) + 2; - break; - - case SLOT_ALLOCATION_DYNAMIC: -@@ -975,6 +984,161 @@ - - } - break; -+ ++ break; ++ ++ case SLOT_ALLOCATION_DYNAMIC: ++ g_assert (stack_is_slot_vacant (self, SLOT_TOP) == OCCUPIED); ++ *y += bubble_get_height (self->slots[SLOT_TOP]) + ++ EM2PIXELS (defaults_get_bubble_vert_gap (d), d) - ++ 2 * EM2PIXELS (defaults_get_bubble_shadow_size (d, is_composited), d); ++ break; ++ ++ default: ++ break; ++ } ++ ++ } ++ break; ++ + case GRAVITY_WEST: + d = self->defaults; + @@ -695,21 +703,13 @@ + *y += EM2PIXELS (defaults_get_icon_size (d), d) + + 2 * EM2PIXELS (defaults_get_margin_size (d), d) + + EM2PIXELS (defaults_get_bubble_vert_gap (d), d) + 2; -+ break; -+ -+ case SLOT_ALLOCATION_DYNAMIC: -+ g_assert (stack_is_slot_vacant (self, SLOT_TOP) == OCCUPIED); -+ *y += bubble_get_height (self->slots[SLOT_TOP]) + -+ EM2PIXELS (defaults_get_bubble_vert_gap (d), d) - -+ 2 * EM2PIXELS (defaults_get_bubble_shadow_size (d, is_composited), d); -+ break; -+ -+ default: -+ break; -+ } -+ -+ } -+ break; + break; + + case SLOT_ALLOCATION_DYNAMIC: +@@ -975,6 +1031,114 @@ + + } + break; + + case GRAVITY_SOUTH_EAST: + d = self->defaults; ++++++ notify-osd_0.9.35+14.10.20140819.orig.tar.gz -> notify-osd_0.9.35+15.04.20150126.orig.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/configure.in new/notify-osd-0.9.35+15.04.20150126/configure.in --- old/notify-osd-0.9.35+14.10.20140819/configure.in 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/configure.in 2015-01-26 15:16:27.000000000 +0100 @@ -31,7 +31,7 @@ # # glib, we need 2.16.0 for the unit-tests # -PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16.0 gthread-2.0 gio-2.0]) +PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.36.0 gthread-2.0 gio-2.0]) # # libwnck used by the dnd code @@ -69,7 +69,7 @@ AM_PATH_GTK_3_0 -PKG_CHECK_MODULES([NOTIFY_OSD], [pixman-1 gtk+-3.0 >= 3.1.6]) +PKG_CHECK_MODULES([NOTIFY_OSD], [pixman-1 gtk+-3.0 >= 3.8.0]) AC_SUBST(NOTIFY_OSD_CFLAGS) AC_SUBST(NOTIFY_OSD_LIBS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/egg/egg-hack.c new/notify-osd-0.9.35+15.04.20150126/egg/egg-hack.c --- old/notify-osd-0.9.35+14.10.20140819/egg/egg-hack.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/egg/egg-hack.c 2015-01-26 15:16:27.000000000 +0100 @@ -61,7 +61,6 @@ static guint egg_main_loop_level = 0; static GSList *main_loops = NULL; -static gboolean egg_is_initialized = FALSE; /** @@ -79,13 +78,6 @@ EGG_CONTEXT (); #endif - if (!egg_is_initialized) - { - g_warning ("Called egg_main() but Egg wasn't initialised. " - "You must call egg_init() first."); - return; - } - EGG_MARK (); egg_main_loop_level++; @@ -116,22 +108,6 @@ EGG_MARK (); } -EggInitError -egg_init (int *argc, - char ***argv) -{ - if (!egg_is_initialized) - { - /* initialise GLib type system */ - g_type_init (); - - egg_is_initialized = TRUE; - } - - return EGG_INIT_SUCCESS; -} - - /* -------------------------------------------------------------------------- */ /* auto-generated code taken from egg-enum-types.c */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/egg/egg-hack.h new/notify-osd-0.9.35+15.04.20150126/egg/egg-hack.h --- old/notify-osd-0.9.35+14.10.20140819/egg/egg-hack.h 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/egg/egg-hack.h 2015-01-26 15:16:27.000000000 +0100 @@ -52,16 +52,6 @@ void egg_threads_leave (void); -typedef enum { - EGG_INIT_SUCCESS = 1, - EGG_INIT_ERROR_UNKNOWN = 0, - EGG_INIT_ERROR_THREADS = -1, - EGG_INIT_ERROR_BACKEND = -2, - EGG_INIT_ERROR_INTERNAL = -3 -} EggInitError; - -EggInitError egg_init (int *argc, - char ***argv); void egg_main (void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline-dup-frames.c new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline-dup-frames.c --- old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline-dup-frames.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline-dup-frames.c 2015-01-26 15:16:27.000000000 +0100 @@ -69,8 +69,6 @@ { TestState state; - egg_init(&argc, &argv); - state.timeline = egg_timeline_new (TEST_TIMELINE_FRAME_COUNT, TEST_TIMELINE_FPS); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline-interpolate.c new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline-interpolate.c --- old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline-interpolate.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline-interpolate.c 2015-01-26 15:16:27.000000000 +0100 @@ -125,8 +125,6 @@ { TestState state; - egg_init (&argc, &argv); - state.timeline = egg_timeline_new (TEST_TIMELINE_FRAME_COUNT, TEST_TIMELINE_FPS); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline-rewind.c new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline-rewind.c --- old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline-rewind.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline-rewind.c 2015-01-26 15:16:27.000000000 +0100 @@ -72,8 +72,6 @@ { TestState state; - egg_init (&argc, &argv); - state.timeline = egg_timeline_new (TEST_TIMELINE_FRAME_COUNT, TEST_TIMELINE_FPS); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline-smoothness.c new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline-smoothness.c --- old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline-smoothness.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline-smoothness.c 2015-01-26 15:16:27.000000000 +0100 @@ -84,8 +84,6 @@ { TestState state; - egg_init (&argc, &argv); - state.timeline = egg_timeline_new (TEST_TIMELINE_FRAME_COUNT, TEST_TIMELINE_FPS); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline.c new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline.c --- old/notify-osd-0.9.35+14.10.20140819/egg/test-timeline.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/egg/test-timeline.c 2015-01-26 15:16:27.000000000 +0100 @@ -72,8 +72,6 @@ gchar **markers; gsize n_markers; - egg_init (&argc, &argv); - timeline_1 = egg_timeline_new (10, 120); egg_timeline_add_marker_at_frame (timeline_1, "foo", 5); egg_timeline_add_marker_at_frame (timeline_1, "bar", 5); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/src/bubble.c new/notify-osd-0.9.35+15.04.20150126/src/bubble.c --- old/notify-osd-0.9.35+14.10.20140819/src/bubble.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/src/bubble.c 2015-01-26 15:16:38.000000000 +0100 @@ -51,11 +51,6 @@ #include "raico-blur.h" #include "tile.h" -G_DEFINE_TYPE (Bubble, bubble, G_TYPE_OBJECT); - -#define GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUBBLE_TYPE, BubblePrivate)) - struct _BubblePrivate { BubbleLayout layout; GtkWidget* widget; @@ -102,6 +97,8 @@ GString* old_icon_filename; }; +G_DEFINE_TYPE_WITH_PRIVATE (Bubble, bubble, G_TYPE_OBJECT); + enum { TIMED_OUT, @@ -498,7 +495,7 @@ static gdouble get_shadow_size (Bubble *bubble) { - BubblePrivate* priv = GET_PRIVATE (bubble); + BubblePrivate* priv = bubble->priv; Defaults* d = bubble->defaults; return defaults_get_bubble_shadow_size (d, priv->composited); } @@ -506,7 +503,7 @@ static gdouble get_corner_radius (Bubble *bubble) { - BubblePrivate* priv = GET_PRIVATE (bubble); + BubblePrivate* priv = bubble->priv; Defaults* d = bubble->defaults; return defaults_get_bubble_corner_radius (d, priv->composited); } @@ -638,7 +635,7 @@ void _refresh_background (Bubble* self) { - BubblePrivate* priv = GET_PRIVATE (self); + BubblePrivate* priv = self->priv; Defaults* d = self->defaults; cairo_t* cr = NULL; cairo_surface_t* scratch = NULL; @@ -939,7 +936,7 @@ void _refresh_icon (Bubble* self) { - BubblePrivate* priv = GET_PRIVATE (self); + BubblePrivate* priv = self->priv; Defaults* d = self->defaults; cairo_surface_t* normal = NULL; cairo_t* cr = NULL; @@ -991,7 +988,7 @@ void _refresh_title (Bubble* self) { - BubblePrivate* priv = GET_PRIVATE (self); + BubblePrivate* priv = self->priv; Defaults* d = self->defaults; cairo_surface_t* normal = NULL; cairo_t* cr = NULL; @@ -1099,7 +1096,7 @@ void _refresh_body (Bubble* self) { - BubblePrivate* priv = GET_PRIVATE (self); + BubblePrivate* priv = self->priv; Defaults* d = self->defaults; cairo_surface_t* normal = NULL; cairo_t* cr = NULL; @@ -1209,7 +1206,7 @@ void _refresh_indicator (Bubble* self) { - BubblePrivate* priv = GET_PRIVATE (self); + BubblePrivate* priv = self->priv; Defaults* d = self->defaults; cairo_surface_t* normal = NULL; cairo_t* cr = NULL; @@ -1362,7 +1359,7 @@ gdouble alpha_normal, gdouble alpha_blur) { - BubblePrivate* priv = GET_PRIVATE (self); + BubblePrivate* priv = self->priv; cairo_pattern_t* pattern; tile_paint (priv->tile_icon, @@ -1432,7 +1429,7 @@ gdouble alpha_normal, gdouble alpha_blur) { - BubblePrivate* priv = GET_PRIVATE (self); + BubblePrivate* priv = self->priv; cairo_pattern_t* pattern; tile_paint (priv->tile_indicator, @@ -1533,7 +1530,7 @@ _render_body (self, cr, shadow + 2 * margin + 2 * icon_half - BUBBLE_CONTENT_BLUR_RADIUS, - shadow + margin + GET_PRIVATE (self)->title_height - BUBBLE_CONTENT_BLUR_RADIUS, + shadow + margin + self->priv->title_height - BUBBLE_CONTENT_BLUR_RADIUS, alpha_normal, alpha_blur); break; @@ -1548,7 +1545,7 @@ _render_body (self, cr, shadow + margin - BUBBLE_CONTENT_BLUR_RADIUS, - shadow + margin + GET_PRIVATE (self)->title_height - BUBBLE_CONTENT_BLUR_RADIUS, + shadow + margin + self->priv->title_height - BUBBLE_CONTENT_BLUR_RADIUS, alpha_normal, alpha_blur); break; @@ -1668,7 +1665,7 @@ if (!self || !IS_BUBBLE (self)) return; - priv = GET_PRIVATE (self); + priv = self->priv; // do we actually need a shape-mask at all? if (priv->composited) @@ -1710,33 +1707,30 @@ composited_changed_handler (GtkWidget* window, gpointer data) { - Bubble* bubble; + Bubble* bubble; + BubblePrivate* priv; - bubble = (Bubble*) G_OBJECT (data); + bubble = BUBBLE (data); + priv = bubble->priv; - GET_PRIVATE (bubble)->composited = gdk_screen_is_composited ( - gtk_widget_get_screen (window)); + priv->composited = gdk_screen_is_composited (gtk_widget_get_screen (window)); update_shape (bubble); } -static -gboolean -expose_handler (GtkWidget* window, - GdkEventExpose* event, - gpointer data) +static gboolean +bubble_draw (GtkWidget* widget, + cairo_t* cr, + gpointer data) { Bubble* bubble; - cairo_t* cr; Defaults* d; BubblePrivate* priv; bubble = (Bubble*) G_OBJECT (data); d = bubble->defaults; - priv = GET_PRIVATE (bubble); - - cr = gdk_cairo_create (gtk_widget_get_window (window)); + priv = bubble->priv; // clear bubble-background cairo_scale (cr, 1.0f, 1.0f); @@ -1767,9 +1761,7 @@ 1.0f - priv->distance); } - cairo_destroy (cr); - - _set_bg_blur (window, + _set_bg_blur (widget, TRUE, EM2PIXELS (get_shadow_size (bubble), d)); @@ -1788,7 +1780,7 @@ if (!bubble_is_visible (bubble)) return FALSE; - priv = GET_PRIVATE (bubble); + priv = bubble->priv; if (!priv->composited) return TRUE; @@ -1802,7 +1794,7 @@ { if (priv->distance < 1.0f && !priv->prevent_fade) { - gtk_window_set_opacity (window, + gtk_widget_set_opacity (priv->widget, WINDOW_MIN_OPACITY + priv->distance * (WINDOW_MAX_OPACITY - @@ -1810,7 +1802,7 @@ bubble_refresh (bubble); } else - gtk_window_set_opacity (window, WINDOW_MAX_OPACITY); + gtk_widget_set_opacity (priv->widget, WINDOW_MAX_OPACITY); } return TRUE; @@ -1897,7 +1889,7 @@ if (!bubble_is_visible (bubble)) return FALSE; - priv = GET_PRIVATE (bubble); + priv = bubble->priv; window = priv->widget; if (!GTK_IS_WINDOW (window)) @@ -1905,10 +1897,19 @@ if (gtk_widget_get_realized (window)) { - gint distance_x = 0; - gint distance_y = 0; + GdkDeviceManager *device_manager; + GdkDevice *device; + gint distance_x; + gint distance_y; + + device_manager = gdk_display_get_device_manager (gtk_widget_get_display (window)); + device = gdk_device_manager_get_client_pointer (device_manager); + gdk_window_get_device_position (gtk_widget_get_window (window), + device, + &pointer_rel_x, + &pointer_rel_y, + NULL); - gtk_widget_get_pointer (window, &pointer_rel_x, &pointer_rel_y); gtk_window_get_position (GTK_WINDOW (window), &win_x, &win_y); pointer_abs_x = win_x + pointer_rel_x; pointer_abs_y = win_y + pointer_rel_y; @@ -1967,12 +1968,14 @@ static void bubble_dispose (GObject* gobject) { + Bubble* bubble; BubblePrivate* priv; if (!gobject || !IS_BUBBLE (gobject)) return; - priv = GET_PRIVATE (gobject); + bubble = BUBBLE (gobject); + priv = bubble->priv; if (GTK_IS_WIDGET (priv->widget)) { @@ -2104,7 +2107,7 @@ BubblePrivate *priv; - self->priv = priv = GET_PRIVATE (self); + self->priv = priv = bubble_get_instance_private (self); priv->layout = LAYOUT_NONE; priv->title = NULL; priv->message_body = NULL; @@ -2138,8 +2141,6 @@ { GObjectClass* gobject_class = G_OBJECT_CLASS (klass); - g_type_class_add_private (klass, sizeof (BubblePrivate)); - gobject_class->dispose = bubble_dispose; gobject_class->finalize = bubble_finalize; gobject_class->get_property = bubble_get_property; @@ -2207,7 +2208,7 @@ return NULL; this->defaults = defaults; - priv = GET_PRIVATE (this); + priv = this->priv; priv->widget = bubble_window_new(); window = priv->widget; @@ -2246,10 +2247,10 @@ &transparent); // hook up window-event handlers to window - g_signal_connect (G_OBJECT (window), - "draw", - G_CALLBACK (expose_handler), - this); + g_signal_connect (window, + "draw", + G_CALLBACK (bubble_draw), + this); // "clear" input-mask, set title/icon/attributes gtk_widget_set_app_paintable (window, TRUE); @@ -2259,10 +2260,10 @@ gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_focus_on_map (GTK_WINDOW (window), FALSE); gtk_window_set_accept_focus (GTK_WINDOW (window), FALSE); - gtk_window_set_opacity (GTK_WINDOW (window), 0.0f); + gtk_widget_set_opacity (window, 0.0f); // TODO: fold some of that back into bubble_init - this->priv = GET_PRIVATE (this); + this->priv = this->priv; this->priv->layout = LAYOUT_NONE; this->priv->widget = window; this->priv->title = g_string_new (""); @@ -2304,7 +2305,7 @@ { g_return_val_if_fail (IS_BUBBLE (self), NULL); - return GET_PRIVATE (self)->synchronous; + return self->priv->synchronous; } gchar* @@ -2312,7 +2313,7 @@ { g_return_val_if_fail (IS_BUBBLE (self), NULL); - return GET_PRIVATE (self)->sender; + return self->priv->sender; } void @@ -2325,7 +2326,7 @@ if (!self || !IS_BUBBLE (self)) return; - priv = GET_PRIVATE (self); + priv = self->priv; // convert any newline to space text = newline_to_space (title); @@ -2341,7 +2342,7 @@ priv->title = g_string_new (text); g_object_notify ( - G_OBJECT (gtk_widget_get_accessible (GET_PRIVATE(self)->widget)), + G_OBJECT (gtk_widget_get_accessible (self->priv->widget)), "accessible-name"); g_free (text); @@ -2353,7 +2354,7 @@ if (!self || !IS_BUBBLE (self)) return NULL; - return GET_PRIVATE (self)->title->str; + return self->priv->title->str; } void @@ -2366,7 +2367,7 @@ if (!self || !IS_BUBBLE (self)) return; - priv = GET_PRIVATE (self); + priv = self->priv; // filter out any HTML/markup if possible text = filter_text (body); @@ -2399,7 +2400,7 @@ if (!self || !IS_BUBBLE (self)) return NULL; - return GET_PRIVATE (self)->message_body->str; + return self->priv->message_body->str; } void @@ -2412,7 +2413,7 @@ if (!self || !IS_BUBBLE (self) || !g_strcmp0 (filepath, "")) return; - priv = GET_PRIVATE (self); + priv = self->priv; // check if an app tries to set the same file as icon again, this check // avoids superfluous regeneration of the tile/blur-cache for the icon, @@ -2449,7 +2450,7 @@ if (!self || !IS_BUBBLE (self) || !g_strcmp0 (filename, "")) return; - priv = GET_PRIVATE (self); + priv = self->priv; //basename = g_path_get_basename (filename); @@ -2556,7 +2557,7 @@ if (!self || !IS_BUBBLE (self) || !pixbuf) return; - priv = GET_PRIVATE (self); + priv = self->priv; // "reset" the stored the icon-filename, fixes LP: #451086 g_string_assign (priv->old_icon_filename, "\0"); @@ -2590,7 +2591,7 @@ { g_return_val_if_fail (IS_BUBBLE (self), NULL); - return GET_PRIVATE (self)->icon_pixbuf; + return self->priv->icon_pixbuf; } void @@ -2602,7 +2603,7 @@ if (!self || !IS_BUBBLE (self)) return; - priv = GET_PRIVATE (self); + priv = self->priv; // only really cause a refresh (blur, recreating tile-/blur-cache) if // a different value has been set, this helps improve performance when @@ -2624,7 +2625,7 @@ if (!self || !IS_BUBBLE (self)) return -2; - return GET_PRIVATE (self)->value; + return self->priv->value; } void @@ -2635,7 +2636,7 @@ if (!self || !IS_BUBBLE (self)) return; - gtk_widget_set_size_request (GET_PRIVATE(self)->widget, width, height); + gtk_widget_set_size_request (self->priv->widget, width, height); } void @@ -2646,7 +2647,7 @@ if (!self || !IS_BUBBLE (self)) return; - gtk_widget_get_size_request (GET_PRIVATE(self)->widget, width, height); + gtk_widget_get_size_request (self->priv->widget, width, height); } void @@ -2656,7 +2657,7 @@ if (!self || !IS_BUBBLE (self)) return; - GET_PRIVATE (self)->timeout = timeout; + self->priv->timeout = timeout; } /* a timeout of 0 doesn't make much sense now does it, thus 0 indicates an @@ -2667,7 +2668,7 @@ if (!self || !IS_BUBBLE (self)) return 0; - return GET_PRIVATE(self)->timeout; + return self->priv->timeout; } void @@ -2677,7 +2678,7 @@ if (!self || !IS_BUBBLE (self)) return; - GET_PRIVATE(self)->timer_id = timer_id; + self->priv->timer_id = timer_id; } /* a valid GLib timer-id is always > 0, thus 0 indicates an error */ @@ -2687,7 +2688,7 @@ if (!self || !IS_BUBBLE (self)) return 0; - return GET_PRIVATE(self)->timer_id; + return self->priv->timer_id; } void @@ -2699,7 +2700,7 @@ if (!self || !IS_BUBBLE (self)) return; - priv = GET_PRIVATE (self); + priv = self->priv; /* did anything change? */ if (priv->mouse_over != flag) @@ -2728,7 +2729,7 @@ if (!self || !IS_BUBBLE (self)) return FALSE; - priv = GET_PRIVATE (self); + priv = self->priv; if (priv->prevent_fade) return FALSE; @@ -2744,7 +2745,7 @@ if (!self || !IS_BUBBLE (self)) return; - gtk_window_move (GTK_WINDOW (GET_PRIVATE (self)->widget), x, y); + gtk_window_move (GTK_WINDOW (self->priv->widget), x, y); } static void @@ -2755,7 +2756,7 @@ g_return_if_fail (IS_BUBBLE (bubble)); - priv = GET_PRIVATE (bubble); + priv = bubble->priv; /* get rid of the alpha, so that the mouse-over algorithm notices */ if (priv->alpha) @@ -2790,7 +2791,7 @@ g_return_if_fail (IS_BUBBLE (self)); - priv = GET_PRIVATE (self); + priv = self->priv; timeline = egg_timeline_new_for_duration (msecs); egg_timeline_set_speed (timeline, FPS); @@ -2827,7 +2828,7 @@ if (!self || !IS_BUBBLE (self)) return; - priv = GET_PRIVATE (self); + priv = self->priv; priv->visible = TRUE; gtk_widget_show_all (priv->widget); @@ -2860,7 +2861,7 @@ return; /* force a redraw */ - gtk_widget_queue_draw (GET_PRIVATE (self)->widget); + gtk_widget_queue_draw (self->priv->widget); } static inline gboolean @@ -2868,13 +2869,13 @@ { /* no g_return_if_fail(), the caller should have already checked that */ - return gtk_widget_is_composited (GET_PRIVATE (bubble)->widget); + return gtk_widget_is_composited (bubble->priv->widget); } static inline GtkWindow* bubble_get_window (Bubble *bubble) { - return GTK_WINDOW (GET_PRIVATE (bubble)->widget); + return GTK_WINDOW (bubble->priv->widget); } static void @@ -2886,15 +2887,15 @@ g_return_if_fail (IS_BUBBLE (bubble)); - opacity = (float)egg_alpha_get_alpha (GET_PRIVATE (bubble)->alpha) + opacity = (float)egg_alpha_get_alpha (bubble->priv->alpha) / (float)EGG_ALPHA_MAX_ALPHA * WINDOW_MAX_OPACITY; if (bubble_is_mouse_over (bubble)) - gtk_window_set_opacity (bubble_get_window (bubble), + gtk_widget_set_opacity (bubble->priv->widget, WINDOW_MIN_OPACITY); else - gtk_window_set_opacity (bubble_get_window (bubble), opacity); + gtk_widget_set_opacity (bubble->priv->widget, opacity); } static void @@ -2920,7 +2921,7 @@ g_return_if_fail (IS_BUBBLE (bubble)); - priv = GET_PRIVATE (bubble); + priv = bubble->priv; /* get rid of the alpha, so that the mouse-over algorithm notices */ if (priv->alpha) @@ -2936,10 +2937,10 @@ } if (bubble_is_mouse_over (bubble)) - gtk_window_set_opacity (bubble_get_window (bubble), + gtk_widget_set_opacity (bubble->priv->widget, WINDOW_MIN_OPACITY); else - gtk_window_set_opacity (bubble_get_window (bubble), + gtk_widget_set_opacity (bubble->priv->widget, WINDOW_MAX_OPACITY); bubble_start_timer (bubble, TRUE); @@ -2954,7 +2955,7 @@ g_return_if_fail (IS_BUBBLE (self)); - priv = GET_PRIVATE (self); + priv = self->priv; if (!bubble_is_composited (self) || msecs == 0) @@ -2990,7 +2991,7 @@ egg_timeline_start (timeline); - gtk_window_set_opacity (bubble_get_window (self), 0.0f); + gtk_widget_set_opacity (self->priv->widget, 0.0f); bubble_show (self); } @@ -3004,7 +3005,7 @@ g_return_if_fail (IS_BUBBLE (self)); - priv = GET_PRIVATE (self); + priv = self->priv; timeline = egg_timeline_new_for_duration (msecs); egg_timeline_set_speed (timeline, FPS); @@ -3043,7 +3044,7 @@ * g_source_remove() on it later. */ bubble_set_timer_id (self, 0); - if (GET_PRIVATE (self)->composited) + if (self->priv->composited) { bubble_fade_out (self, 300); return FALSE; @@ -3068,7 +3069,7 @@ if (!self || !IS_BUBBLE (self) || !bubble_is_visible (self)) return; - priv = GET_PRIVATE (self); + priv = self->priv; priv->visible = FALSE; gtk_widget_hide (priv->widget); @@ -3096,7 +3097,7 @@ if (!self || !IS_BUBBLE (self)) return; - GET_PRIVATE (self)->id = id; + self->priv->id = id; } guint @@ -3105,7 +3106,7 @@ if (!self || !IS_BUBBLE (self)) return 0; - return GET_PRIVATE (self)->id; + return self->priv->id; } gboolean @@ -3114,7 +3115,7 @@ if (!self || !IS_BUBBLE (self)) return FALSE; - return GET_PRIVATE (self)->visible; + return self->priv->visible; } void @@ -3127,7 +3128,7 @@ if (!self || !IS_BUBBLE (self)) return; - priv = GET_PRIVATE (self); + priv = self->priv; timer_id = bubble_get_timer_id (self); if (timer_id > 0) @@ -3158,7 +3159,7 @@ if (!self || !IS_BUBBLE (self)) return; - timer_id = GET_PRIVATE(self)->timer_id; + timer_id = self->priv->timer_id; if (timer_id > 0) { g_source_remove (timer_id); @@ -3174,7 +3175,7 @@ if (!self || !IS_BUBBLE (self)) return; - gtk_window_get_position (GTK_WINDOW (GET_PRIVATE (self)->widget), + gtk_window_get_position (GTK_WINDOW (self->priv->widget), x, y); } @@ -3187,7 +3188,7 @@ if (!self || !IS_BUBBLE (self)) return 0; - gtk_window_get_size (GTK_WINDOW (GET_PRIVATE (self)->widget), + gtk_window_get_size (GTK_WINDOW (self->priv->widget), &width, &height); @@ -3200,7 +3201,7 @@ if (!self || !IS_BUBBLE (self)) return 0; - return GET_PRIVATE (self)->future_height; + return self->priv->future_height; } gint @@ -3221,7 +3222,7 @@ return 0; d = self->defaults; - priv = GET_PRIVATE (self); + priv = self->priv; surface = cairo_image_surface_create (CAIRO_FORMAT_A1, 1, 1); if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS) { @@ -3297,7 +3298,7 @@ return 0; d = self->defaults; - priv = GET_PRIVATE (self); + priv = self->priv; cr = gdk_cairo_create (gtk_widget_get_window (priv->widget)); if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) { @@ -3404,7 +3405,7 @@ return; d = self->defaults; - priv = GET_PRIVATE (self); + priv = self->priv; /* FIXME: a quick fix to rescale an icon (e.g. user changed font-size or ** DPI while a bubble is displayed, thus bubble is re-rendered and the @@ -3439,7 +3440,7 @@ priv->title_height = _calc_title_height ( self, - GET_PRIVATE (self)->title_width); + self->priv->title_width); new_bubble_height = EM2PIXELS (defaults_get_bubble_min_height (d), d) + @@ -3458,7 +3459,7 @@ priv->title_height = _calc_title_height ( self, - GET_PRIVATE (self)->title_width); + self->priv->title_width); priv->body_width = EM2PIXELS (defaults_get_bubble_width (d), d) - @@ -3601,7 +3602,7 @@ g_return_if_fail (IS_BUBBLE (self)); - priv = GET_PRIVATE (self); + priv = self->priv; if (priv->synchronous != NULL) g_free (priv->synchronous); @@ -3617,7 +3618,7 @@ g_return_if_fail (IS_BUBBLE (self)); - priv = GET_PRIVATE (self); + priv = self->priv; if (priv->sender != NULL) g_free (priv->sender); @@ -3631,7 +3632,7 @@ if (!self || !IS_BUBBLE (self)) return FALSE; - return (GET_PRIVATE (self)->synchronous != NULL); + return (self->priv->synchronous != NULL); } gboolean @@ -3639,7 +3640,7 @@ { g_return_val_if_fail (IS_BUBBLE (self), FALSE); - return (GET_PRIVATE (self)->urgency == 2); + return (self->priv->urgency == 2); } guint @@ -3647,7 +3648,7 @@ { g_return_val_if_fail (IS_BUBBLE (self), 0); - return GET_PRIVATE (self)->urgency; + return self->priv->urgency; } void @@ -3656,7 +3657,7 @@ { g_return_if_fail (IS_BUBBLE (self)); - GET_PRIVATE (self)->urgency = urgency; + self->priv->urgency = urgency; } void @@ -3668,7 +3669,7 @@ if (!self || !IS_BUBBLE (self)) return; - priv = GET_PRIVATE (self); + priv = self->priv; /* set a sane default */ priv->layout = LAYOUT_NONE; @@ -3739,7 +3740,7 @@ if (!self || !IS_BUBBLE (self)) return LAYOUT_NONE; - return GET_PRIVATE (self)->layout; + return self->priv->layout; } void @@ -3749,7 +3750,7 @@ if (!self || !IS_BUBBLE (self)) return; - GET_PRIVATE (self)->icon_only = allowed; + self->priv->icon_only = allowed; } void @@ -3759,7 +3760,7 @@ if (!self || !IS_BUBBLE (self)) return; - GET_PRIVATE (self)->append = allowed; + self->priv->append = allowed; } @@ -3769,7 +3770,7 @@ if (!self || !IS_BUBBLE (self)) return FALSE; - return GET_PRIVATE (self)->append; + return self->priv->append; } void @@ -3784,7 +3785,7 @@ if (!self || !IS_BUBBLE (self) || !append_body) return; - priv = GET_PRIVATE (self); + priv = self->priv; // filter out any HTML/markup if possible result = pango_parse_markup (append_body, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/src/defaults.c new/notify-osd-0.9.35+15.04.20150126/src/defaults.c --- old/notify-osd-0.9.35+14.10.20140819/src/defaults.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/src/defaults.c 2015-01-26 15:16:27.000000000 +0100 @@ -1865,6 +1865,8 @@ { GdkRectangle rect; GdkWindow* active_window = NULL; + GdkDeviceManager* device_manager; + GdkDevice* device; gint mx; gint my; gint monitor = 0; @@ -1875,11 +1877,9 @@ g_return_if_fail (self != NULL && IS_DEFAULTS (self)); - gdk_display_get_pointer (gdk_display_get_default (), - screen, - &mx, - &my, - NULL); + device_manager = gdk_display_get_device_manager (gdk_display_get_default ()); + device = gdk_device_manager_get_client_pointer (device_manager); + gdk_device_get_position (device, screen, &mx, &my); is_composited = gdk_screen_is_composited (*screen); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/src/dialog.c new/notify-osd-0.9.35+15.04.20150126/src/dialog.c --- old/notify-osd-0.9.35+14.10.20140819/src/dialog.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/src/dialog.c 2015-01-26 15:16:27.000000000 +0100 @@ -176,7 +176,8 @@ dialog = gtk_dialog_new (); - hbox = g_object_new (GTK_TYPE_HBOX, + hbox = g_object_new (GTK_TYPE_BOX, + "orientation", GTK_ORIENTATION_HORIZONTAL, "spacing", gap, "border-width", 12, NULL); @@ -190,7 +191,8 @@ gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); - vbox = g_object_new (GTK_TYPE_VBOX, + vbox = g_object_new (GTK_TYPE_BOX, + "orientation", GTK_ORIENTATION_VERTICAL, NULL); title = gtk_label_new (NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/src/main.c new/notify-osd-0.9.35+15.04.20150126/src/main.c --- old/notify-osd-0.9.35+14.10.20140819/src/main.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/src/main.c 2015-01-26 15:16:27.000000000 +0100 @@ -48,7 +48,6 @@ Observer* observer = NULL; DBusGConnection* connection = NULL; - g_thread_init (NULL); dbus_g_thread_init (); log_init (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/tests/test-alpha-animation.c new/notify-osd-0.9.35+15.04.20150126/tests/test-alpha-animation.c --- old/notify-osd-0.9.35+14.10.20140819/tests/test-alpha-animation.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/tests/test-alpha-animation.c 2015-01-26 15:16:27.000000000 +0100 @@ -56,8 +56,6 @@ EggTimeline *timeline; EggAlpha *alpha; - egg_init (&argc, &argv); - timeline = egg_timeline_new_for_duration (700); alpha = egg_alpha_new_full (timeline, EGG_ALPHA_SINE_DEC, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/tests/test-grow-bubble.c new/notify-osd-0.9.35+15.04.20150126/tests/test-grow-bubble.c --- old/notify-osd-0.9.35+14.10.20140819/tests/test-grow-bubble.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/tests/test-grow-bubble.c 2015-01-26 15:16:27.000000000 +0100 @@ -328,7 +328,7 @@ a.height, g_distance, 1.0f - g_distance); - gtk_window_set_opacity (GTK_WINDOW (window), 0.3f + g_distance * 0.7f); + gtk_widget_set_opacity (window, 0.3f + g_distance * 0.7f); } else { @@ -340,7 +340,7 @@ a.height, g_distance, 0.0f); - gtk_window_set_opacity (GTK_WINDOW (window), 1.0f); + gtk_widget_set_opacity (window, 1.0f); } return TRUE; @@ -482,10 +482,19 @@ if (gtk_widget_get_realized (window)) { - gint distance_x = 0; - gint distance_y = 0; + GdkDeviceManager *device_manager; + GdkDevice *device; + gint distance_x; + gint distance_y; + + device_manager = gdk_display_get_device_manager (gtk_widget_get_display (window)); + device = gdk_device_manager_get_client_pointer (device_manager); + gdk_window_get_device_position (gtk_widget_get_window (window), + device, + &pointer_rel_x, + &pointer_rel_y, + NULL); - gtk_widget_get_pointer (window, &pointer_rel_x, &pointer_rel_y); gtk_window_get_position (GTK_WINDOW (window), &win_x, &win_y); pointer_abs_x = win_x + pointer_rel_x; pointer_abs_y = win_y + pointer_rel_y; @@ -714,7 +723,7 @@ gtk_window_set_keep_above (GTK_WINDOW (window), TRUE); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_accept_focus (GTK_WINDOW (window), FALSE); - gtk_window_set_opacity (GTK_WINDOW (window), 1.0f); + gtk_widget_set_opacity (window, 1.0f); gtk_widget_set_size_request (window, (gint) (BUBBLE_WIDTH + 2.0f * BUBBLE_SHADOW_SIZE), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/notify-osd-0.9.35+14.10.20140819/tests/test-scroll-text.c new/notify-osd-0.9.35+15.04.20150126/tests/test-scroll-text.c --- old/notify-osd-0.9.35+14.10.20140819/tests/test-scroll-text.c 2014-08-19 15:47:48.000000000 +0200 +++ new/notify-osd-0.9.35+15.04.20150126/tests/test-scroll-text.c 2015-01-26 15:16:27.000000000 +0100 @@ -442,7 +442,7 @@ cairo_pattern_destroy (mask); cairo_pattern_destroy (pattern); - gtk_window_set_opacity (GTK_WINDOW (window), + gtk_widget_set_opacity (window, 0.3f + g_distance * 0.7f); } else @@ -461,7 +461,7 @@ cairo_mask (cr, mask); cairo_pattern_destroy (pattern); - gtk_window_set_opacity (GTK_WINDOW (window), 1.0f); + gtk_widget_set_opacity (window, 1.0f); } return TRUE; @@ -542,10 +542,19 @@ if (gtk_widget_get_realized (window)) { - gint distance_x = 0; - gint distance_y = 0; + GdkDeviceManager *device_manager; + GdkDevice *device; + gint distance_x; + gint distance_y; + + device_manager = gdk_display_get_device_manager (gtk_widget_get_display (window)); + device = gdk_device_manager_get_client_pointer (device_manager); + gdk_window_get_device_position (gtk_widget_get_window (window), + device, + &pointer_rel_x, + &pointer_rel_y, + NULL); - gtk_widget_get_pointer (window, &pointer_rel_x, &pointer_rel_y); gtk_window_get_position (GTK_WINDOW (window), &win_x, &win_y); pointer_abs_x = win_x + pointer_rel_x; pointer_abs_y = win_y + pointer_rel_y; @@ -911,7 +920,7 @@ gtk_window_set_keep_above (GTK_WINDOW (window), TRUE); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_accept_focus (GTK_WINDOW (window), FALSE); - gtk_window_set_opacity (GTK_WINDOW (window), 1.0f); + gtk_widget_set_opacity (window, 1.0f); gtk_widget_set_size_request (window, (gint) (BUBBLE_WIDTH + 2.0f * BUBBLE_SHADOW_SIZE), -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
