After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 335873 - notebook DND + popup windows
notebook DND + popup windows
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-03-24 18:25 UTC by Christian Persch
Modified: 2011-02-04 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase as patch for testnotebookdnd.c (1.12 KB, text/plain)
2006-03-24 18:27 UTC, Christian Persch
  Details
patch to fix this (1.52 KB, patch)
2006-06-20 00:59 UTC, Carlos Garnacho
committed Details | Review

Description Christian Persch 2006-03-24 18:25:55 UTC
When a modal window which is parented to the window containing the notebook pops up, the notebook DND operation in progress should be aborted.
What happens right now is that while the dialogue is up, the dragged tab stays whereever it was when the window popped up, even after the popup is gone, until ... not sure what exactly, but tab switching makes the position right again.

You can see this problem in Epiphany HEAD with a gecko 1.7 backend (or set browser.xul.error_pages.enabled to false in about:config), and drag a tab when a timeout popup comes up.
Comment 1 Christian Persch 2006-03-24 18:27:32 UTC
Created attachment 61935 [details]
testcase as patch for testnotebookdnd.c

The patch makes testnotebookdnd popup/hide a modal window regularly. If you drag a tab when the popup comes up, you can see the effect.
Comment 2 Matthias Clasen 2006-04-20 04:21:23 UTC
I believe this should be fixed by stopping any reordering/drag
in gtk_notebook_grab_notify.

Comment 3 Carlos Garnacho 2006-04-20 09:56:37 UTC
I'm working on this
Comment 4 Carlos Garnacho 2006-06-20 00:59:32 UTC
Created attachment 67662 [details] [review]
patch to fix this

the patch moves the line:

priv->pressed_button = -1;

inside gtk_notebook_stop_reorder() (it was being always called beside that function anyway) and calls this function inside gtk_notebook_grab_notify()
Comment 5 Matthias Clasen 2006-06-20 02:38:07 UTC
Looks fine to commit. 
Comment 6 Carlos Garnacho 2006-06-20 11:49:43 UTC
Thanks!

2006-06-20  Carlos Garnacho  <carlosg@gnome.org>

        * gtk/gtknotebook.c (gtk_notebook_stop_reorder): unset the pressed
        button here.
        (gtk_notebook_grab_notify): stop reorder when the widget becomes
        shadowed. Fixes bug #335873