tags 666231 + patch
thanks

Hello,

I prepared an additional patch for this bug and uploaded a NMU on
mentors.d.n :

http://mentors.debian.net/debian/pool/main/b/byzanz/byzanz_0.2.2+git22.10.2011-1.3.dsc

Gregor, would you be interested in sponsoring this upload ?

Have a nice day,

-- 
Etienne Millon
diff -u byzanz-0.2.2+git22.10.2011/configure.ac byzanz-0.2.2+git22.10.2011/configure.ac
--- byzanz-0.2.2+git22.10.2011/configure.ac
+++ byzanz-0.2.2+git22.10.2011/configure.ac
@@ -65,14 +65,14 @@
 
 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 @@
 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 -u byzanz-0.2.2+git22.10.2011/debian/changelog byzanz-0.2.2+git22.10.2011/debian/changelog
--- byzanz-0.2.2+git22.10.2011/debian/changelog
+++ byzanz-0.2.2+git22.10.2011/debian/changelog
@@ -1,3 +1,13 @@
+byzanz (0.2.2+git22.10.2011-1.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTBFS with gtk 3.4 (Closes: #666231)
+    - pick commit 3924af from upstream
+    - use gtk_widget_get_preferred_size and gtk_render_background
+      instead of their deprecated counterparts
+
+ -- Etienne Millon <etienne.mil...@gmail.com>  Wed, 25 Jul 2012 17:35:33 +0200
+
 byzanz (0.2.2+git22.10.2011-1.2) unstable; urgency=low
 
   * Non-maintainer upload. 
only in patch2:
unchanged:
--- byzanz-0.2.2+git22.10.2011.orig/src/byzanzencoder.c
+++ byzanz-0.2.2+git22.10.2011/src/byzanzencoder.c
@@ -276,8 +276,7 @@
 {
   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);
 
only in patch2:
unchanged:
--- byzanz-0.2.2+git22.10.2011.orig/src/byzanzlayercursor.c
+++ byzanz-0.2.2+git22.10.2011/src/byzanzlayercursor.c
@@ -64,8 +64,16 @@
 {
   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 @@
   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)
only in patch2:
unchanged:
--- byzanz-0.2.2+git22.10.2011.orig/src/record.c
+++ byzanz-0.2.2+git22.10.2011/src/record.c
@@ -131,7 +131,6 @@
   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);
only in patch2:
unchanged:
--- byzanz-0.2.2+git22.10.2011.orig/src/paneltogglebutton.c
+++ byzanz-0.2.2+git22.10.2011/src/paneltogglebutton.c
@@ -35,7 +35,7 @@
   child = gtk_bin_get_child (GTK_BIN (widget));
 
   if (child) {
-    gtk_widget_size_request (child, requisition);
+    gtk_widget_get_preferred_size (child, requisition, NULL);
   } else {
     requisition->width = requisition->height = 0;
   }
@@ -91,6 +91,8 @@
   GtkStateType state_type;
   GtkShadowType shadow_type;
   GtkAllocation allocation;
+  GtkStyleContext *context = gtk_widget_get_style_context (widget);
+  GtkStateFlags flags = 0;
 
   state_type = gtk_widget_get_state (widget);
     
@@ -107,9 +109,34 @@
     state_type = GTK_STATE_SELECTED;
   /* FIXME: better detail? */
   gtk_widget_get_allocation (widget, &allocation);
-  gtk_paint_flat_box (gtk_widget_get_style (widget), cr, state_type, shadow_type,
-                      widget, "togglebutton", allocation.x,
-                      allocation.y, allocation.width, allocation.height);
+  gtk_style_context_add_class (context, "togglebutton");
+  switch (state_type)
+    {
+    case GTK_STATE_PRELIGHT:
+      flags |= GTK_STATE_FLAG_PRELIGHT;
+      break;
+    case GTK_STATE_SELECTED:
+      flags |= GTK_STATE_FLAG_SELECTED;
+      break;
+    case GTK_STATE_INSENSITIVE:
+      flags |= GTK_STATE_FLAG_INSENSITIVE;
+      break;
+    case GTK_STATE_ACTIVE:
+      flags |= GTK_STATE_FLAG_ACTIVE;
+      break;
+    case GTK_STATE_FOCUSED:
+      flags |= GTK_STATE_FLAG_FOCUSED;
+      break;
+    case GTK_STATE_NORMAL:
+    case GTK_STATE_INCONSISTENT:
+    default:
+      break;
+  }
+
+  gtk_style_context_set_state (context, flags);
+  gtk_render_background (context, cr, (gdouble) allocation.x, (gdouble) allocation.y,
+                                 (gdouble) allocation.width, (gdouble) allocation.height);
+  (void) shadow_type;
 
   if (child)
     gtk_container_propagate_draw (GTK_CONTAINER (widget), child, cr);
only in patch2:
unchanged:
--- byzanz-0.2.2+git22.10.2011.orig/src/byzanzselect.c
+++ byzanz-0.2.2+git22.10.2011/src/byzanzselect.c
@@ -227,7 +227,7 @@
       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 @@
   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 @@
 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 ***/
only in patch2:
unchanged:
--- byzanz-0.2.2+git22.10.2011.orig/src/playback.c
+++ byzanz-0.2.2+git22.10.2011/src/playback.c
@@ -71,7 +71,6 @@
   textdomain (GETTEXT_PACKAGE);
 #endif
 
-  g_thread_init (NULL);
   g_type_init ();
 
   context = g_option_context_new (_("process a Byzanz debug recording"));

Reply via email to