Commit 3863d89d authored by Victor Ananjevsky's avatar Victor Ananjevsky

Added some restrictions for fix yad behavior in wayland (not X11)

parent c718bf7d
...@@ -554,7 +554,7 @@ create_dialog (void) ...@@ -554,7 +554,7 @@ create_dialog (void)
gtk_window_fullscreen (GTK_WINDOW (dlg)); gtk_window_fullscreen (GTK_WINDOW (dlg));
} }
#ifndef G_OS_WIN32 #ifdef GDK_WINDOWING_X11
/* print xid */ /* print xid */
if (options.print_xid) if (options.print_xid)
{ {
...@@ -790,6 +790,15 @@ main (gint argc, gchar ** argv) ...@@ -790,6 +790,15 @@ main (gint argc, gchar ** argv)
signal (SIGUSR2, sa_usr2); signal (SIGUSR2, sa_usr2);
#endif #endif
#ifndef GDK_WINDOWING_X11
if (options.plug != -1)
{
options.plug = -1;
if (options.debug)
g_printerr ("YAD: WARNING: --plug mode not supported outside X11");
}
#endif
/* plug mode */ /* plug mode */
if (options.plug != -1) if (options.plug != -1)
{ {
...@@ -799,6 +808,14 @@ main (gint argc, gchar ** argv) ...@@ -799,6 +808,14 @@ main (gint argc, gchar ** argv)
return ret; return ret;
} }
#ifndef GDK_WINDOWING_X11
if (options.mode == YAD_MODE_NOTEBOOK || options.mode == YAD_MODE_PANED)
{
g_printerr ("This mode not supported outside X11");
return 1;
}
#endif
switch (options.mode) switch (options.mode)
{ {
case YAD_MODE_ABOUT: case YAD_MODE_ABOUT:
...@@ -834,7 +851,7 @@ main (gint argc, gchar ** argv) ...@@ -834,7 +851,7 @@ main (gint argc, gchar ** argv)
default: default:
dialog = create_dialog (); dialog = create_dialog ();
#ifndef G_OS_WIN32 #ifdef GDK_WINDOWING_X11
/* add YAD_XID variable */ /* add YAD_XID variable */
str = g_strdup_printf ("0x%X", (guint) GDK_WINDOW_XID (gtk_widget_get_window (dialog))); str = g_strdup_printf ("0x%X", (guint) GDK_WINDOW_XID (gtk_widget_get_window (dialog)));
g_setenv ("YAD_XID", str, TRUE); g_setenv ("YAD_XID", str, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment