summaryrefslogtreecommitdiff
path: root/gtk/window-decorator/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/window-decorator/events.c')
-rw-r--r--gtk/window-decorator/events.c42
1 files changed, 34 insertions, 8 deletions
diff --git a/gtk/window-decorator/events.c b/gtk/window-decorator/events.c
index 1faec8b..73e44ef 100644
--- a/gtk/window-decorator/events.c
+++ b/gtk/window-decorator/events.c
@@ -1,3 +1,28 @@
+/*
+ * Copyright © 2006 Novell, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David Reveman <davidr@novell.com>
+ *
+ * 2D Mode: Copyright © 2010 Sam Spilsbury <smspillaz@gmail.com>
+ * Frames Management: Copright © 2011 Canonical Ltd.
+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
+ */
+
#include "gtk-window-decorator.h"
void
@@ -387,7 +412,7 @@ void
handle_mouse_wheel_title_event (WnckWindow *win,
unsigned int button)
{
- switch (wheel_action) {
+ switch (settings->wheel_action) {
case WHEEL_ACTION_SHADE:
if (button == 4)
{
@@ -436,7 +461,7 @@ title_event (WnckWindow *win,
dist (gtkwd_event->x, gtkwd_event->y,
last_button_x, last_button_y) < DOUBLE_CLICK_DISTANCE)
{
- handle_title_button_event (win, double_click_action,
+ handle_title_button_event (win, settings->double_click_action,
gtkwd_event);
last_button_num = 0;
@@ -460,12 +485,12 @@ title_event (WnckWindow *win,
}
else if (gtkwd_event->button == 2)
{
- handle_title_button_event (win, middle_click_action,
+ handle_title_button_event (win, settings->middle_click_action,
gtkwd_event);
}
else if (gtkwd_event->button == 3)
{
- handle_title_button_event (win, right_click_action,
+ handle_title_button_event (win, settings->right_click_action,
gtkwd_event);
}
else if (gtkwd_event->button == 4 ||
@@ -534,11 +559,11 @@ frame_common_event (WnckWindow *win,
restack_window (win, Above);
break;
case 2:
- handle_title_button_event (win, middle_click_action,
+ handle_title_button_event (win, settings->middle_click_action,
gtkwd_event);
break;
case 3:
- handle_title_button_event (win, right_click_action,
+ handle_title_button_event (win, settings->right_click_action,
gtkwd_event);
break;
}
@@ -955,7 +980,8 @@ event_filter_func (GdkXEvent *gdkxevent,
if (screen)
{
- shadow_property_changed (screen);
+ if (shadow_property_changed (screen))
+ decorations_changed (screen);
}
}
else if (xevent->xproperty.atom == mwm_hints_atom)
@@ -1138,7 +1164,7 @@ selection_event_filter_func (GdkXEvent *gdkxevent,
case SelectionClear:
status = decor_handle_selection_clear (xdisplay, xevent, 0);
if (status == DECOR_SELECTION_GIVE_UP)
- exit (0);
+ gtk_main_quit ();
default:
break;
}