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 730767 - Tab that's being dragged is not updated
Tab that's being dragged is not updated
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-05-26 14:53 UTC by Egmont Koblinger
Modified: 2014-06-02 03:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
this is how I've tried it (patch to testnotebookdnd.c) (887 bytes, patch)
2014-05-30 06:44 UTC, Christian Persch
none Details | Review
my patch (1.39 KB, patch)
2014-05-30 14:50 UTC, Matthias Clasen
none Details | Review
what I see (860.03 KB, video/webm)
2014-05-30 14:52 UTC, Matthias Clasen
  Details
what I see with chpe's patch (218.16 KB, video/mp4)
2014-05-30 16:09 UTC, Egmont Koblinger
  Details

Description Egmont Koblinger 2014-05-26 14:53:12 UTC
Start g-t with a single window, multiple tabs.

Execute something like "sleep 5; seq 1 10" and then start dragging this tab while the "sleep" command is running. Move your mouse horizontally only, stay within the tab bar.

Notice that while dragging, seq's output (and the shell prompt) is not printed, they're replaced by the Gtk+ theme's default background color. The display is not even updated when you finish dragging the tab and drop it to its desired location.

The display is properly updated on a subsequent tab chance, focus out, mouse highlight etc.
Comment 1 Egmont Koblinger 2014-05-26 18:09:06 UTC
vte's widget_class->draw [i.e. vte_terminal_draw()] is not being called when dragging the tab. No idea why.

roxterm doesn't suffer from this bug.
Comment 2 Egmont Koblinger 2014-05-27 09:43:50 UTC
It once happened to me with roxterm, too. (With g-t it happens all the time.)

Gtk+ bug?
Comment 3 Christian Persch 2014-05-27 10:42:55 UTC
-> gtk+

Same happens in gtk+/tests/testnotebookdnd: patch it to continually update the entry texts in a timeout, then start a tab reodering drag; while the drag is in progress, the notebook page's content isn't being redrawn.
Comment 4 Christian Persch 2014-05-27 10:45:20 UTC
This appears to be by design:

gtk_notebook_draw():
[...]

      if (priv->cur_page && priv->operation != DRAG_OPERATION_REORDER)
        gtk_container_propagate_draw (GTK_CONTAINER (notebook),
                                      priv->cur_page->child,
                                      cr);

but I don't see any reason for this...
Comment 5 Matthias Clasen 2014-05-30 01:22:18 UTC
(In reply to comment #3)
> -> gtk+
> 
> Same happens in gtk+/tests/testnotebookdnd: patch it to continually update the
> entry texts in a timeout, then start a tab reodering drag; while the drag is in
> progress, the notebook page's content isn't being redrawn.

I've been trying this, and it works fine for me.

> but I don't see any reason for this...

If you look a few lines down, you'll see that we are drawing the current tab separately in the DRAG_OPERATION_REORDER case.
Comment 6 Christian Persch 2014-05-30 06:44:50 UTC
Created attachment 277516 [details] [review]
this is how I've tried it (patch to testnotebookdnd.c)

When the reorder drag starts (or perhaps as soon as the first invalidate of the tab contents afterwards?), the tab content doesn't drag at all.

In case it might make any difference, I'm using gnome-shell 3.8 as window manager.
Comment 7 Egmont Koblinger 2014-05-30 11:13:11 UTC
Matthias: I can also reproduce with ChPe's test patch, too.  Make sure to stay in the notebook tab bar area with the mouse.
Comment 8 Matthias Clasen 2014-05-30 14:50:58 UTC
Created attachment 277559 [details] [review]
my patch
Comment 9 Matthias Clasen 2014-05-30 14:52:06 UTC
Created attachment 277560 [details]
what I see
Comment 10 Egmont Koblinger 2014-05-30 16:09:46 UTC
Created attachment 277570 [details]
what I see with chpe's patch

It's not the tab label, it's the actual tabbed content (in the test app: the text input fields) that's not updated.
Comment 11 Matthias Clasen 2014-05-30 17:25:52 UTC
ah, I missed that detail, thanks
Comment 12 Egmont Koblinger 2014-06-01 23:52:34 UTC
Thanks a lot! :)
[https://git.gnome.org/browse/gtk+/commit/?id=4d1930c]