Merge pull request #831 from achadwick/gtk3-tabdragfixes

gtk3: backport fixes for notebook tab-drag crashes
This commit is contained in:
Ray Donnelly
2015-10-18 01:28:35 +01:00
2 changed files with 50 additions and 3 deletions

View File

@@ -0,0 +1,41 @@
diff --git a/gdk/win32/gdkdevice-virtual.c b/gdk/win32/gdkdevice-virtual.c
index 2ed341f..b947800 100644
--- a/gdk/win32/gdkdevice-virtual.c
+++ b/gdk/win32/gdkdevice-virtual.c
@@ -266,10 +266,9 @@ gdk_device_virtual_grab (GdkDevice *device,
{
if (GetCursor () == GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor)
SetCursor (NULL);
- g_clear_object (&_gdk_win32_grab_cursor);
}
- _gdk_win32_grab_cursor = cursor;
+ g_set_object (&_gdk_win32_grab_cursor, cursor);
if (_gdk_win32_grab_cursor != NULL)
SetCursor (GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor);
@@ -303,9 +302,8 @@ gdk_device_virtual_ungrab (GdkDevice *device,
{
if (GetCursor () == GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor)
SetCursor (NULL);
- g_clear_object (&_gdk_win32_grab_cursor);
}
- _gdk_win32_grab_cursor = NULL;
+ g_clear_object (&_gdk_win32_grab_cursor);
ReleaseCapture ();
}
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index d08cee0..2ae8105 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -4933,8 +4933,7 @@ finish_drag (MoveResizeData *mv_resize)
{
gdk_window_destroy (mv_resize->moveresize_emulation_window);
mv_resize->moveresize_emulation_window = NULL;
- g_object_unref (mv_resize->moveresize_window);
- mv_resize->moveresize_window = NULL;
+ g_clear_object (&mv_resize->moveresize_window);
g_clear_pointer (&mv_resize->moveresize_pending_event, g_free);
}

View File

@@ -4,7 +4,7 @@ _realname=gtk3
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.18.2
pkgrel=1
pkgrel=2
pkgdesc="GObject-based multi-platform GUI toolkit (v3) (mingw-w64)"
arch=('any')
url="http://www.gtk.org"
@@ -30,10 +30,14 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
options=('strip' '!debug' 'staticlibs')
source=("http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver%.*}/gtk+-${pkgver}.tar.xz"
0013-fix-mingw-w64-fstat-call.mingw.patch
0056-missing-file-toarray-pl.patch)
0056-missing-file-toarray-pl.patch
0080-backport-notebook-tab-drag-fixes.patch
)
md5sums=('230fd78e42419d35ff790784b457e5f2'
'21789d52c1debcab59f8b6a99232de68'
'f25cb2486d761b60e04036947552bf82')
'f25cb2486d761b60e04036947552bf82'
'8d86218ed960cd86c8b04c987f7038e9'
)
prepare() {
cd "${srcdir}/gtk+-${pkgver}"
@@ -42,6 +46,8 @@ prepare() {
rm -f gdk/broadway/toarray.pl
patch -p1 -i ${srcdir}/0056-missing-file-toarray-pl.patch
patch -Np1 -i ${srcdir}/0080-backport-notebook-tab-drag-fixes.patch
autoreconf -i
}