marco: Don't destroy window on GTK+2.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackware-id.org>
This commit is contained in:
Willy Sudiarto Raharjo 2014-05-08 15:57:04 +07:00
parent 7149c26425
commit 313cac7e17
2 changed files with 53 additions and 1 deletions

View file

@ -0,0 +1,49 @@
From 7efc3d6e3ba89ec456b99349364f72b5c861ad96 Mon Sep 17 00:00:00 2001
From: Stefano Karapetsas <stefano@karapetsas.com>
Date: Mon, 05 May 2014 10:01:09 +0000
Subject: Dont destroy all windows with GTK2
Regression introduced with http://git.mate-desktop.org/marco/commit/?id=3695f97acfd3d81e7f9ce23be3243d63fce35746
---
diff --git a/src/core/display.c b/src/core/display.c
index 2fdf6bf..c7d7900 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1523,11 +1523,7 @@ static gboolean maybe_send_event_to_gtk(MetaDisplay* display, XEvent* xevent)
gdk_event = gdk_event_new(GDK_BUTTON_RELEASE);
}
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_event->button.window = g_object_ref(gdk_window);
-#else
- gdk_event->button.window = gdk_window;
-#endif
gdk_event->button.send_event = 0;
gdk_event->button.axes = NULL;
gdk_event->button.state = 0;
@@ -1543,11 +1539,7 @@ static gboolean maybe_send_event_to_gtk(MetaDisplay* display, XEvent* xevent)
case MotionNotify:
gdk_event = gdk_event_new(GDK_MOTION_NOTIFY);
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_event->motion.window = g_object_ref(gdk_window);
-#else
- gdk_event->motion.window = gdk_window;
-#endif
gdk_event->motion.send_event = FALSE;
gdk_event->motion.time = 0;
gdk_event->motion.x = 0;
@@ -1564,11 +1556,7 @@ static gboolean maybe_send_event_to_gtk(MetaDisplay* display, XEvent* xevent)
case LeaveNotify:
gdk_event = gdk_event_new(xevent->type == EnterNotify ? GDK_ENTER_NOTIFY : GDK_LEAVE_NOTIFY);
-#if GTK_CHECK_VERSION(3, 0, 0)
gdk_event->crossing.window = g_object_ref(gdk_window);
-#else
- gdk_event->crossing.window = gdk_window;
-#endif
gdk_event->crossing.send_event = 0;
gdk_event->crossing.subwindow = NULL;
gdk_event->crossing.time = 0;
--
cgit

View file

@ -25,7 +25,7 @@
PRGNAM=marco
VERSION=${VERSION:-1.9.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_msb}
if [ -z "$ARCH" ]; then
@ -74,6 +74,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# upstream patch to not destroy window on GTK+2
patch -p1 < $CWD/7efc3d6e3b.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \