summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/matchbox-desktop/files
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-03-23 11:17:25 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-28 14:55:49 (GMT)
commit1209eb2841c5a4f333f31b1c6a0148fef2bc5795 (patch)
tree8015714ebcada01ca07367ad6538969453626a5c /meta/recipes-sato/matchbox-desktop/files
parent036167693ae495e5613db20b83c1c59aa8fbc163 (diff)
downloadpoky-1209eb2841c5a4f333f31b1c6a0148fef2bc5795.tar.gz
matchbox-desktop: Do not close desktop on alt-F4
There are cases where user can close the desktop with a well timed alt-F4: prevent this from happening [YOCTO #2063] (From OE-Core rev: e0c5bcb73f3663990ccb489a75cbc59927fc9e13) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato/matchbox-desktop/files')
-rw-r--r--meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch60
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 0000000..46397dc
--- /dev/null
+++ b/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch
@@ -0,0 +1,60 @@
1From 5fe37ef38500f858a22ecdf9bf69bf06e213bf68 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Tue, 22 Mar 2016 12:41:35 +0200
4Subject: [PATCH] Do nothing on delete-event when not STANDALONE
5
6This prevents an opportunistic alt-F4 from closing the desktop.
7
8Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
9Signed-off-by: Ross Burton <ross.burton@intel.com>
10
11
12Upstream-Status: Backport
13---
14 src/desktop.c | 12 +++++++++++-
15 1 file changed, 11 insertions(+), 1 deletion(-)
16
17diff --git a/src/desktop.c b/src/desktop.c
18index 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--
592.7.0
60