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 742422 - Single tab with no focus after dnd
Single tab with no focus after dnd
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-05 22:31 UTC by Egmont Koblinger
Modified: 2015-01-09 22:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (557 bytes, patch)
2015-01-08 18:39 UTC, Egmont Koblinger
committed Details | Review

Description Egmont Koblinger 2015-01-05 22:31:53 UTC
Two g-t windows: one with tabs A and B, the other one with a single tab C.

Drag-n-drop tab B next to C.

The first window still has the WM focus, yet its only terminal A is not focused, you can't type into it. Changing WM focus back-n-forth doesn't help.

Pressing TAB, or clicking inside the terminal repairs this situation. I assume the Gtk+ focus is still on the no longer visible tab bar.

I think in this case the Gtk+ focus should be forced to the vte widget.
Comment 1 Christian Persch 2015-01-07 18:47:17 UTC
Yes, shoudl gtk_widget_grab_focus on the active screen if after a DND op there's only one tab in the window and the focus was in the notebook.
Comment 2 Egmont Koblinger 2015-01-08 18:39:05 UTC
Created attachment 294118 [details] [review]
Fix

Something like this I guess...

I'm not checking if the focus was on the tab bar; where else could it be? And even if it's somewhere else, it's still nice to grab it :)
Comment 3 Egmont Koblinger 2015-01-08 18:53:32 UTC
It would also be nice if the target window would receive WM focus, so that you can immediately work in the just dragged tab. But I'm afraid it's beyond our control to perform WM operations.
Comment 4 Christian Persch 2015-01-08 19:06:29 UTC
That's what present_on_insert in terminal-window.c is supposed to do... might have broken.
Comment 5 Egmont Koblinger 2015-01-09 22:10:26 UTC
Comment on attachment 294118 [details] [review]
Fix

Note: the same story (and fixed by the same patch) when closing the 2nd tab with the tab's X button whereas the 1st tab label is focused.
Comment 6 Egmont Koblinger 2015-01-09 22:13:07 UTC
I'm no longer sure we should focus the destination window - at least checked gedit and firefox, neither of them does.

The orig bug is fixed now.