[Xfce4-commits] <xfce4-panel:master> Don't destroy window when focussed and Alt+F4 is pressed (bug #7378).

Nick Schermer noreply at xfce.org
Thu Jan 5 21:50:01 CET 2012


Updating branch refs/heads/master
         to 5d15b8be24aabc04c0dcbedcd3a117c3b13bb925 (commit)
       from ebc59cd34977ba6000175d0f52220bda3b0a1f34 (commit)

commit 5d15b8be24aabc04c0dcbedcd3a117c3b13bb925
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Jan 5 21:48:24 2012 +0100

    Don't destroy window when focussed and Alt+F4 is pressed (bug #7378).

 panel/panel-window.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/panel/panel-window.c b/panel/panel-window.c
index d84189a..1852ad5 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -83,6 +83,8 @@ static void         panel_window_set_property               (GObject          *o
 static void         panel_window_finalize                   (GObject          *object);
 static gboolean     panel_window_expose_event               (GtkWidget        *widget,
                                                              GdkEventExpose   *event);
+static gboolean     panel_window_delete_event               (GtkWidget        *widget,
+                                                             GdkEventAny      *event);
 static gboolean     panel_window_enter_notify_event         (GtkWidget        *widget,
                                                              GdkEventCrossing *event);
 static gboolean     panel_window_leave_notify_event         (GtkWidget        *widget,
@@ -331,6 +333,7 @@ panel_window_class_init (PanelWindowClass *klass)
 
   gtkwidget_class = GTK_WIDGET_CLASS (klass);
   gtkwidget_class->expose_event = panel_window_expose_event;
+  gtkwidget_class->delete_event = panel_window_delete_event;
   gtkwidget_class->enter_notify_event = panel_window_enter_notify_event;
   gtkwidget_class->leave_notify_event = panel_window_leave_notify_event;
   gtkwidget_class->drag_motion = panel_window_drag_motion;
@@ -839,6 +842,16 @@ end:
 
 
 static gboolean
+panel_window_delete_event (GtkWidget   *widget,
+                           GdkEventAny *event)
+{
+  /* do not respond to alt-f4 or any other signals */
+  return TRUE;
+}
+
+
+
+static gboolean
 panel_window_enter_notify_event (GtkWidget        *widget,
                                  GdkEventCrossing *event)
 {


More information about the Xfce4-commits mailing list