[byzanz] rebuild

Matthias Clasen mclasen at fedoraproject.org
Tue Dec 6 22:43:24 UTC 2011


commit d161561ad38ee2c69c280e14d568ae880dc83dfc
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Tue Dec 6 17:43:00 2011 -0500

    rebuild

 0001-Deal-with-various-deprecations.patch |  178 +++++++++++++++++++++++++++++
 byzanz.spec                               |    8 +-
 2 files changed, 185 insertions(+), 1 deletions(-)
---
diff --git a/0001-Deal-with-various-deprecations.patch b/0001-Deal-with-various-deprecations.patch
new file mode 100644
index 0000000..13a8dc3
--- /dev/null
+++ b/0001-Deal-with-various-deprecations.patch
@@ -0,0 +1,178 @@
+From 3924afcc774f4010c46cb9c3eb5240bf9fb4bb18 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Tue, 6 Dec 2011 14:19:19 -0500
+Subject: [PATCH] Deal with various deprecations
+
+---
+ configure.ac            |   10 +++++-----
+ src/byzanzencoder.c     |    3 +--
+ src/byzanzlayercursor.c |   24 ++++++++++++++++++++----
+ src/byzanzselect.c      |   18 +++++++++++++-----
+ src/playback.c          |    1 -
+ src/record.c            |    1 -
+ 6 files changed, 39 insertions(+), 18 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a6f1135..044473f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -65,14 +65,14 @@ dnl ====================================
+ 
+ CAIRO_REQ="1.10"
+ GTK_REQ="3.0.0"
+-GTHREAD_REQ="2.6.0"
+ APPLET_REQ="2.91.91"
+ XDAMAGE_REQ="1.0"
+ GST_REQ="0.10.24"
++GIO_REQ="2.31"
+ 
+-PKG_CHECK_MODULES(GTK, cairo >= $CAIRO_REQ gtk+-3.0 >= $GTK_REQ x11 gio-2.0)
++PKG_CHECK_MODULES(GTK, cairo >= $CAIRO_REQ gtk+-3.0 >= $GTK_REQ x11 gio-2.0 >= $GIO_REQ)
+ 
+-PKG_CHECK_MODULES(GTHREAD, xdamage >= $XDAMAGE_REQ gthread-2.0 >= $GTHREAD_REQ)
++PKG_CHECK_MODULES(XDAMAGE, xdamage >= $XDAMAGE_REQ)
+ 
+ LIBPANEL_APPLET="libpanelapplet-4.0"
+ PKG_CHECK_MODULES(APPLET, $LIBPANEL_APPLET >= $APPLET_REQ)
+@@ -91,8 +91,8 @@ GIFENC_LIBS="$GTK_LIBS"
+ AC_SUBST(GIFENC_CFLAGS)
+ AC_SUBST(GIFENC_LIBS)
+ 
+-BYZANZ_CFLAGS="$GTK_CFLAGS $GTHREAD_CFLAGS $GST_CFLAGS $ERROR_CFLAGS"
+-BYZANZ_LIBS="$GTK_LIBS $GTHREAD_LIBS $GST_LIBS"
++BYZANZ_CFLAGS="$GTK_CFLAGS $XDAMAGE_CFLAGS $GST_CFLAGS $ERROR_CFLAGS"
++BYZANZ_LIBS="$GTK_LIBS $XDAMAGE_LIBS $GST_LIBS"
+ AC_SUBST(BYZANZ_CFLAGS)
+ AC_SUBST(BYZANZ_LIBS)
+ 
+diff --git a/src/byzanzencoder.c b/src/byzanzencoder.c
+index a2c98f4..b3a4d51 100644
+--- a/src/byzanzencoder.c
++++ b/src/byzanzencoder.c
+@@ -276,8 +276,7 @@ byzanz_encoder_constructed (GObject *object)
+ {
+   ByzanzEncoder *encoder = BYZANZ_ENCODER (object);
+ 
+-  encoder->thread = g_thread_create (byzanz_encoder_thread, encoder, 
+-      TRUE, &encoder->error);
++  encoder->thread = g_thread_new ("encoder", byzanz_encoder_thread, encoder);
+   if (encoder->thread)
+     g_object_ref (encoder);
+ 
+diff --git a/src/byzanzlayercursor.c b/src/byzanzlayercursor.c
+index 8358493..87ba342 100644
+--- a/src/byzanzlayercursor.c
++++ b/src/byzanzlayercursor.c
+@@ -64,8 +64,16 @@ byzanz_layer_cursor_poll (gpointer data)
+ {
+   ByzanzLayerCursor *clayer = data;
+   int x, y;
+-  
+-  gdk_window_get_pointer (BYZANZ_LAYER (clayer)->recorder->window, &x, &y, NULL);
++  GdkDevice *device;
++  GdkDeviceManager *device_manager;
++  GdkDisplay *display;
++  GdkWindow *window;
++
++  window = BYZANZ_LAYER (clayer)->recorder->window;
++  display = gdk_window_get_display (window);
++  device_manager = gdk_display_get_device_manager (display);
++  device = gdk_device_manager_get_client_pointer (device_manager);
++  gdk_window_get_device_position (window, device, &x, &y, NULL);
+   if (x == clayer->cursor_x &&
+       y == clayer->cursor_y)
+     return TRUE;
+@@ -107,8 +115,16 @@ byzanz_layer_cursor_snapshot (ByzanzLayer *layer)
+   ByzanzLayerCursor *clayer = BYZANZ_LAYER_CURSOR (layer);
+   cairo_region_t *region, *area;
+   int x, y;
+-  
+-  gdk_window_get_pointer (layer->recorder->window, &x, &y, NULL);
++  GdkDevice *device;
++  GdkDeviceManager *device_manager;
++  GdkDisplay *display;
++  GdkWindow *window;
++
++  window = layer->recorder->window;
++  display = gdk_window_get_display (window);
++  device_manager = gdk_display_get_device_manager (display);
++  device = gdk_device_manager_get_client_pointer (device_manager);
++  gdk_window_get_device_position (window, device, &x, &y, NULL);
+   if (x == clayer->cursor_x &&
+       y == clayer->cursor_y &&
+       clayer->cursor_next == clayer->cursor)
+diff --git a/src/byzanzselect.c b/src/byzanzselect.c
+index c74b1ef..bb2c911 100644
+--- a/src/byzanzselect.c
++++ b/src/byzanzselect.c
+@@ -227,7 +227,7 @@ realize_cb (GtkWidget *widget, gpointer datap)
+       GDK_POINTER_MOTION_MASK);
+   cursor = gdk_cursor_new (GDK_CROSSHAIR);
+   gdk_window_set_cursor (window, cursor);
+-  gdk_cursor_unref (cursor);
++  g_object_unref (cursor);
+   gdk_window_set_background_pattern (window, NULL);
+ }
+ 
+@@ -308,7 +308,7 @@ select_window_button_pressed_cb (GtkWidget *widget, GdkEventButton *event, gpoin
+   ByzanzSelectData *data = datap;
+   GdkWindow *window;
+ 
+-  gdk_pointer_ungrab (event->time);
++  gdk_device_ungrab (gdk_event_get_device ((GdkEvent*)event), event->time);
+   if (event->button == 1) {
+     Window w;
+ 
+@@ -335,14 +335,22 @@ static void
+ byzanz_select_window (ByzanzSelectData *data)
+ {
+   GdkCursor *cursor;
+-  
++  GdkWindow *window;
++  GdkDevice *device;
++  GdkDeviceManager *device_manager;
++  GdkDisplay *display;
++
+   cursor = gdk_cursor_new (GDK_CROSSHAIR);
+   data->window = gtk_invisible_new ();
+   g_signal_connect (data->window, "button-press-event", 
+       G_CALLBACK (select_window_button_pressed_cb), data);
+   gtk_widget_show (data->window);
+-  gdk_pointer_grab (gtk_widget_get_window (data->window), FALSE, GDK_BUTTON_PRESS_MASK, NULL, cursor, GDK_CURRENT_TIME);
+-  gdk_cursor_unref (cursor);
++  window = gtk_widget_get_window (data->window);
++  display = gdk_window_get_display (window);
++  device_manager = gdk_display_get_device_manager (display);
++  device = gdk_device_manager_get_client_pointer (device_manager);
++  gdk_device_grab (device, window, GDK_OWNERSHIP_NONE, FALSE, GDK_BUTTON_PRESS_MASK, cursor, GDK_CURRENT_TIME);
++  g_object_unref (cursor);
+ }
+   
+ /*** API ***/
+diff --git a/src/playback.c b/src/playback.c
+index a74d0e9..f650ff8 100644
+--- a/src/playback.c
++++ b/src/playback.c
+@@ -71,7 +71,6 @@ main (int argc, char **argv)
+   textdomain (GETTEXT_PACKAGE);
+ #endif
+ 
+-  g_thread_init (NULL);
+   g_type_init ();
+ 
+   context = g_option_context_new (_("process a Byzanz debug recording"));
+diff --git a/src/record.c b/src/record.c
+index e0871c8..5c83b01 100644
+--- a/src/record.c
++++ b/src/record.c
+@@ -131,7 +131,6 @@ main (int argc, char **argv)
+   textdomain (GETTEXT_PACKAGE);
+ #endif
+ 
+-  g_thread_init (NULL);
+   context = g_option_context_new (_("record your current desktop session"));
+ #ifdef GETTEXT_PACKAGE
+   g_option_context_set_translation_domain(context, GETTEXT_PACKAGE);
+-- 
+1.7.7.3
+
diff --git a/byzanz.spec b/byzanz.spec
index db8aa0a..75bbc0b 100644
--- a/byzanz.spec
+++ b/byzanz.spec
@@ -2,7 +2,7 @@
 Summary: A desktop recorder
 Name: byzanz
 Version: 0.3
-Release: 0.3%{?dist}
+Release: 0.4%{?dist}
 License: GPLv3+
 Group: Applications/Multimedia
 URL: http://git.gnome.org/browse/byzanz/
@@ -30,6 +30,8 @@ Requires(pre): GConf2
 Requires(post): GConf2
 Requires(preun): GConf2
 
+Patch0: 0001-Deal-with-various-deprecations.patch
+
 %description
 Byzanz is a desktop recorder striving for ease of use. It can record to 
 GIF images, Ogg Theora video - optionally with sound - and other formats.
@@ -37,6 +39,7 @@ A GNOME panel applet and a command-line recording tool are included.
 
 %prep
 %setup -q -n byzanz-%{git}
+%patch0 -p1
 
 %build
 ./autogen.sh
@@ -104,6 +107,9 @@ fi
 %{_mandir}/man1/byzanz-record.1*
 
 %changelog
+* Tue Dec  6 2011 Matthias Clasen <mclasen at redhat.com> - 0.3-0.4
+- Deal with deprecations
+
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 0.3-0.3
 - Rebuild for new libpng
 


More information about the scm-commits mailing list