From 9a14f4c0f96e34dd29abc0c94cbe2bd2a58e5bb1 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sun, 24 Mar 2002 14:34:07 +0000 Subject: [PATCH] r1341: Fixed problem which allowed the panel to get the input focus (reported by Brendan McCarthy). --- ROX-Filer/Help/Changes | 5 +++++ ROX-Filer/src/gui_support.c | 17 +++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index 3dafaa97..153ed57b 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -2,6 +2,11 @@ A RISC OS-like filer for X by Thomas Leonard +24-Mar-2002 +~~~~~~~~~~~ +Fixed problem which allowed the panel to get the input focus (reported by +Brendan McCarthy). + 22-Mar-2002 ~~~~~~~~~~~ Large (over 50K) image files are now loaded in a subprocess. Faster, less diff --git a/ROX-Filer/src/gui_support.c b/ROX-Filer/src/gui_support.c index cf788708..73fbe35c 100644 --- a/ROX-Filer/src/gui_support.c +++ b/ROX-Filer/src/gui_support.c @@ -181,8 +181,8 @@ void make_panel_window(GtkWidget *widget) static GdkAtom xa_state, xa_atom, xa_net_state, xa_hints, xa_win_hints; static GdkAtom state_list[3]; GdkWindow *window = widget->window; - gint32 values[2]; - + gint32 wm_hints_values[] = {1, False, 0, 0, 0, 0, 0, 0}; + GdkAtom wm_protocols[2]; g_return_if_fail(window != NULL); @@ -236,11 +236,16 @@ void make_panel_window(GtkWidget *widget) g_return_if_fail(window != NULL); - values[0] = 1; /* InputHint */ - values[1] = False; - gdk_property_change(window, xa_hints, xa_hints, 32, - GDK_PROP_MODE_REPLACE, (guchar *) values, 2); + GDK_PROP_MODE_REPLACE, (guchar *) wm_hints_values, + sizeof(wm_hints_values) / sizeof(gint32)); + + wm_protocols[0] = gdk_atom_intern("WM_DELETE_WINDOW", FALSE); + wm_protocols[1] = gdk_atom_intern("_NET_WM_PING", FALSE); + gdk_property_change(window, + gdk_atom_intern("WM_PROTOCOLS", FALSE), xa_atom, 32, + GDK_PROP_MODE_REPLACE, (guchar *) wm_protocols, + sizeof(wm_protocols) / sizeof(GdkAtom)); } static gboolean error_idle_cb(gpointer data) -- 2.11.4.GIT