diff options
Diffstat (limited to 'meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch')
-rw-r--r-- | meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch b/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch new file mode 100644 index 0000000000..46397dc8a2 --- /dev/null +++ b/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 5fe37ef38500f858a22ecdf9bf69bf06e213bf68 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Tue, 22 Mar 2016 12:41:35 +0200 | ||
4 | Subject: [PATCH] Do nothing on delete-event when not STANDALONE | ||
5 | |||
6 | This prevents an opportunistic alt-F4 from closing the desktop. | ||
7 | |||
8 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
9 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
10 | |||
11 | |||
12 | Upstream-Status: Backport | ||
13 | --- | ||
14 | src/desktop.c | 12 +++++++++++- | ||
15 | 1 file changed, 11 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/desktop.c b/src/desktop.c | ||
18 | index d4fc2fb..94b4ddf 100644 | ||
19 | --- a/src/desktop.c | ||
20 | +++ b/src/desktop.c | ||
21 | @@ -122,6 +122,15 @@ load_items (TakuMenu *menu) | ||
22 | |||
23 | } | ||
24 | |||
25 | +#ifndef STANDALONE | ||
26 | +static gboolean | ||
27 | +delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data) | ||
28 | +{ | ||
29 | + /* prevent default handler from destroying the window */ | ||
30 | + return TRUE; | ||
31 | +} | ||
32 | +#endif | ||
33 | + | ||
34 | static void | ||
35 | workarea_changed (int x, int y, int w, int h) | ||
36 | { | ||
37 | @@ -144,11 +153,11 @@ create_desktop (void) | ||
38 | gtk_icon_size_register ("taku-icon", 64, 64); | ||
39 | |||
40 | window = gtk_window_new (GTK_WINDOW_TOPLEVEL); | ||
41 | - g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), NULL); | ||
42 | gtk_widget_set_name (window, "TakuWindow"); | ||
43 | gtk_window_set_title (GTK_WINDOW (window), _("Desktop")); | ||
44 | |||
45 | #ifndef STANDALONE | ||
46 | + g_signal_connect (window, "delete-event", G_CALLBACK (delete_event_cb), NULL); | ||
47 | gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DESKTOP); | ||
48 | gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), TRUE); | ||
49 | |||
50 | @@ -156,6 +165,7 @@ create_desktop (void) | ||
51 | screen_w = gdk_screen_get_width (screen); | ||
52 | screen_h = gdk_screen_get_height (screen); | ||
53 | #else | ||
54 | + g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), NULL); | ||
55 | screen_w = 640; | ||
56 | screen_h = 480; | ||
57 | #endif | ||
58 | -- | ||
59 | 2.7.0 | ||
60 | |||