[totem/wip/hadess/bug-fixes: 1/2] brasero-disc-recorder: Remove X11 window parenting



commit a4c99c6af01c170385f11486b432bf0d0f71f0e4
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Feb 7 20:37:49 2019 +0100

    brasero-disc-recorder: Remove X11 window parenting

 .../brasero-disc-recorder/totem-disc-recorder.c    | 25 +++-------------------
 1 file changed, 3 insertions(+), 22 deletions(-)
---
diff --git a/src/plugins/brasero-disc-recorder/totem-disc-recorder.c 
b/src/plugins/brasero-disc-recorder/totem-disc-recorder.c
index b250e6f3e..b4a229f07 100644
--- a/src/plugins/brasero-disc-recorder/totem-disc-recorder.c
+++ b/src/plugins/brasero-disc-recorder/totem-disc-recorder.c
@@ -26,7 +26,6 @@
 #include <glib/gi18n-lib.h>
 #include <glib/gstdio.h>
 #include <gmodule.h>
-#include <gdk/gdkx.h>
 #include <libpeas/peas-extension-base.h>
 #include <libpeas/peas-object-module.h>
 #include <libpeas/peas-activatable.h>
@@ -64,35 +63,17 @@ totem_disc_recorder_plugin_start_burning (TotemDiscRecorderPlugin *pi,
 {
        GtkWindow *main_window;
        GdkScreen *screen;
-       GdkDisplay *display;
-       gchar *command_line;
        GList *uris;
        GAppInfo *info;
        GdkAppLaunchContext *context;
        GError *error = NULL;
-       char *xid_arg;
 
        main_window = totem_object_get_main_window (pi->priv->totem);
        screen = gtk_widget_get_screen (GTK_WIDGET (main_window));
-       display = gdk_display_get_default ();
-
-       /* Build a command line to use */
-       xid_arg = NULL;
-#ifdef GDK_WINDOWING_X11
-       if (GDK_IS_X11_DISPLAY (display))
-               xid_arg = g_strdup_printf ("-x %d", (int) gdk_x11_window_get_xid (gtk_widget_get_window 
(GTK_WIDGET (main_window))));
-#endif /* GDK_WINDOWING_X11 */
-       g_object_unref (main_window);
-
-       if (copy != FALSE)
-               command_line = g_strdup_printf ("brasero %s -c", xid_arg ? xid_arg : "");
-       else
-               command_line = g_strdup_printf ("brasero %s -r", xid_arg ? xid_arg : "");
 
        /* Build the app info */
-       info = g_app_info_create_from_commandline (command_line, NULL,
+       info = g_app_info_create_from_commandline (copy ? "brasero -c" : "brasero -r", NULL,
                                                   G_APP_INFO_CREATE_SUPPORTS_URIS | 
G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION, &error);
-       g_free (command_line);
 
        if (error != NULL)
                goto error;
@@ -111,11 +92,11 @@ totem_disc_recorder_plugin_start_burning (TotemDiscRecorderPlugin *pi,
        if (error != NULL)
                goto error;
 
+       g_object_unref (main_window);
+
        return TRUE;
 
 error:
-       main_window = totem_object_get_main_window (pi->priv->totem);
-
        if (copy != FALSE)
                totem_interface_error (_("The video disc could not be duplicated."), error->message, 
main_window);
        else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]