diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2018-04-13 00:46:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-13 00:46:18 -0400 |
commit | a22bf0142f842fd7efe27acf7a0d906dab501517 (patch) | |
tree | 1d4c1faf790128d2fcbaa16574423db8c142612d /widget/gtk/nsWindow.cpp | |
parent | ff362dd20098bb3b2122fb7c7daf1d057b29c570 (diff) | |
parent | a0a79a9aa3af02ece6d18b5ee91bab9989941a41 (diff) | |
download | UXP-a22bf0142f842fd7efe27acf7a0d906dab501517.tar UXP-a22bf0142f842fd7efe27acf7a0d906dab501517.tar.gz UXP-a22bf0142f842fd7efe27acf7a0d906dab501517.tar.lz UXP-a22bf0142f842fd7efe27acf7a0d906dab501517.tar.xz UXP-a22bf0142f842fd7efe27acf7a0d906dab501517.zip |
Merge pull request #136 from trav90/gtk-work
Improve GTK3 support
Diffstat (limited to 'widget/gtk/nsWindow.cpp')
-rw-r--r-- | widget/gtk/nsWindow.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index d97b35002..e4e69c1b4 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -6627,6 +6627,22 @@ nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent, return false; } + if (mIsX11Display) { + // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=789054 + // To avoid crashes disable double-click on WM without _NET_WM_MOVERESIZE. + // See _should_perform_ewmh_drag() at gdkwindow-x11.c + GdkScreen* screen = gdk_window_get_screen(gdk_window); + GdkAtom atom = gdk_atom_intern("_NET_WM_MOVERESIZE", FALSE); + if (!gdk_x11_screen_supports_net_wm_hint(screen, atom)) { + static unsigned int lastTimeStamp = 0; + if (lastTimeStamp != aMouseEvent->mTime) { + lastTimeStamp = aMouseEvent->mTime; + } else { + return false; + } + } + } + // FIXME: It would be nice to have the widget position at the time // of the event, but it's relatively unlikely that the widget has // moved since the mousedown. (On the other hand, it's quite likely |