Skip to content

Commit 20c2ffa

Browse files
committed
csd-autorun.c: Remove hidden 'hold shift key' feature.
This relied on X11 functions, but GdkKeymap is also useless in a wayland session. This was a completely hidden feature, anyhow, so just remove it. ref: https://bugzilla.redhat.com/show_bug.cgi?id=2399866
1 parent cd7975d commit 20c2ffa

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

plugins/automount/csd-autorun.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
#include <glib/gi18n.h>
2929
#include <gio/gio.h>
3030
#include <gtk/gtk.h>
31-
#include <gdk/gdkx.h>
32-
#include <X11/XKBlib.h>
33-
#include <gdk/gdkkeysyms.h>
3431

3532
#include "csd-autorun.h"
3633

@@ -377,27 +374,6 @@ prepare_combo_box (GtkWidget *combo_box,
377374
g_free (content_type);
378375
}
379376

380-
static gboolean
381-
is_shift_pressed (void)
382-
{
383-
gboolean ret;
384-
XkbStateRec state;
385-
Bool status;
386-
387-
ret = FALSE;
388-
389-
gdk_x11_display_error_trap_push (gdk_display_get_default ());
390-
status = XkbGetState (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
391-
XkbUseCoreKbd, &state);
392-
gdk_x11_display_error_trap_pop_ignored (gdk_display_get_default ());
393-
394-
if (status == Success) {
395-
ret = state.mods & ShiftMask;
396-
}
397-
398-
return ret;
399-
}
400-
401377
enum {
402378
AUTORUN_DIALOG_RESPONSE_EJECT = 0
403379
};
@@ -628,7 +604,6 @@ do_autorun_for_content_type (GMount *mount,
628604
GIcon *icon;
629605
GdkPixbuf *pixbuf;
630606
int icon_size;
631-
gboolean user_forced_dialog;
632607
gboolean pref_ask;
633608
gboolean pref_start_app;
634609
gboolean pref_ignore;
@@ -646,15 +621,9 @@ do_autorun_for_content_type (GMount *mount,
646621
goto out;
647622
}
648623

649-
user_forced_dialog = is_shift_pressed ();
650-
651624
csd_autorun_get_preferences (x_content_type, &pref_start_app, &pref_ignore, &pref_open_folder);
652625
pref_ask = !pref_start_app && !pref_ignore && !pref_open_folder;
653626

654-
if (user_forced_dialog) {
655-
goto show_dialog;
656-
}
657-
658627
if (!pref_ask && !pref_ignore && !pref_open_folder) {
659628
GAppInfo *app_info;
660629
app_info = g_app_info_get_default_for_type (x_content_type, FALSE);
@@ -673,8 +642,6 @@ do_autorun_for_content_type (GMount *mount,
673642
goto out;
674643
}
675644

676-
show_dialog:
677-
678645
mount_name = g_mount_get_name (mount);
679646

680647
dialog = gtk_dialog_new ();

0 commit comments

Comments
 (0)