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 754109 - Tooltip is poping up with window filled with the upper right screen part
Tooltip is poping up with window filled with the upper right screen part
Status: RESOLVED DUPLICATE of bug 698730
Product: gtk+
Classification: Platform
Component: Widget: Other
3.14.x
Other other
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 753798 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-08-26 09:12 UTC by mi
Modified: 2017-07-31 19:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtktooltip.patch (1.07 KB, patch)
2015-08-26 09:17 UTC, mi
rejected Details | Review

Description mi 2015-08-26 09:12:46 UTC
OS: Debian 8 (LXDE GUI)
GTK+ 3 versions: 3.14 & 3.16
Windows manager: openbox


Reproduced on the following programs using GTK GUI:
===================================================
1. Parole 0.8.0.
2. Gnome player.1.0.9
3. Debian document viewer evince 1.2.3.


Issue description:
====================
When hovering with the cursor on & off the button GTK Widget, a tooltip appears and hide as it should.
on some of the times, prior to the right text and background appearing,
the rectangular window of the tooltip is filled with the upper right side of the screen (only for a few ms, but noticeable to the naked eye).
Furthermore, the tooltip first blinks on the upper left corner of the screen, before pop-up on the right location.

Issue is not reproduced on non-GTK3 GUI buttons tooltips (e.g. on the Debian file manager PCManFM 1.2.3).
Comment 1 mi 2015-08-26 09:17:35 UTC
Created attachment 310009 [details] [review]
gtktooltip.patch

This is the patch of gtktooltip.c that should solve this bug.
Comment 2 mi 2015-08-26 09:19:20 UTC
Bug is of the GTK code:
==================================================
The Tooltip is shown on the upper left side of the screen (0,0) before it is moved in order to calculate boundaries for the allocation of the window.

It is not hide, and only later being moved to it's place.

In the meanwhile, the user see it blinking, with garbage inside.

I suggested a solution (workaround) of hiding the window after doing, the calculations (quick enough for not being shown on the screen).
Thus, the window of tooltip is only shown to user after using the move command.


in code I suggest - GTK3+ --> gtktooltip.c --> gtk_tooltip_position():
========================================================================
After the boundaries calculations: 
height = gtk_widget_get_allocated_height (GTK_WIDGET (tooltip->current_window)) - border.top - border.bottom;

Add the line: 
gtk_widget_set_visible (GTK_WIDGET (tooltip->current_window), FALSE);

see suggested fix attached prior:
================================
gtktooltip.patch for gtktooltip.c
Comment 3 mi 2015-08-26 09:21:14 UTC
*** Bug 753798 has been marked as a duplicate of this bug. ***
Comment 4 Alex Băluț 2015-11-03 01:14:32 UTC
Duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=698730
Comment 5 Alexandre Franke 2016-11-24 15:27:02 UTC

*** This bug has been marked as a duplicate of bug 698730 ***
Comment 6 Daniel Boles 2017-07-31 19:23:31 UTC
Review of attachment 310009 [details] [review]:

No comment on the sense of the patch - just cosmetics.

If this is still an issue for you, and you still want this considered, please reupload it at the marked duplicate Bug 698730. I'll mark as rejected here for the same reason.

::: gtktooltip.c
@@ +1020,2 @@
   gtk_widget_realize (GTK_WIDGET (tooltip->current_window));
+  gtk_widget_set_visible (GTK_WIDGET (tooltip->current_window), TRUE); //Show widget only for boundaries calculations at the upper left corner

GTK+ currently still supports C89, so C99-style comments cannot be used. Anyway, this should go above the line it describes, as it makes it too long right, now, and there should be a space between the opening token and the start of the text.

@@ +1031,3 @@
   height = gtk_widget_get_allocated_height (GTK_WIDGET (tooltip->current_window)) - border.top - border.bottom;
 
+  gtk_widget_set_visible (GTK_WIDGET (tooltip->current_window), FALSE);//Now that we have calculated the boundaries, hide the tooltip, until moved and shown.

Ditto.