13
$\begingroup$

From time to time, and in several different computers running various versions of Ubuntu, I've had Mathematica tooltips get "stuck", and persist on the screen even when I navigate away to other windows, which can be very disruptive:

The tooltip appears in front of all other windows, except new tooltips, and it interrupts things like middle-wheel scroll. This normally goes away if I quit and restart the front-end, but of course that can be pretty inconvenient.

Is this behaviour known? Is there a simple way to kill the Front End's tooltips without killing the session?

$\endgroup$
  • $\begingroup$ Try seeing if it can be reset with something like: FrontEndExecute@FrontEnd`CursorTooltipPacket[$FrontEndSession, None]. I have never seen this, so I can't recreate it to test. Be warned that I don't know exactly how that FE packet operates. $\endgroup$ – b3m2a1 Apr 17 '17 at 2:09
  • $\begingroup$ @MB1965 It's intermittent and I can't reproduce it consistently, but I'll give it a go next time it happens. $\endgroup$ – Emilio Pisanty Apr 17 '17 at 8:54
  • $\begingroup$ The next time a persistent tooltip happens to me, I intend to press Ctrl-P and then Alt-C. Raising the Print Dialog and then canceling it may erase the persistent tooltip. Maybe someone else will confirm or refute that this works before I get the opportunity. $\endgroup$ – LouisB Apr 17 '17 at 9:36
  • $\begingroup$ @EmilioPisanty I suffer from the same issue. For me, it seems this only happens with error tooltips of graphical cells but I cannot be sure of this. In any case, this should be reported. $\endgroup$ – halirutan Apr 18 '17 at 1:29
  • $\begingroup$ @halirutan I see this behaviour with normal tooltips as well. It's normally on heavy graphics cells when the front end is under heavy load, but it feels pretty random and I've been unable to reproduce it consistently. I'll give your method a go in a bit. $\endgroup$ – Emilio Pisanty Apr 18 '17 at 6:26
16
$\begingroup$

Preface: This issue seems to appear solely on Linux. For me, a reliable way to reproduce it is to do the following: Create this plot wich contains an invalid Epilog

data = RandomReal[1, {100, 2}];
ListPlot[data, Epilog -> Table[Point[], {20}]]

You get the plot with is red, and when you hover with the mouse over the area, you get the normal tooltip showing you what is wrong. Now, click on the code line again to have the cursor ready for re-evaluating the plot but before you go on, make sure your mouse still hovers over the plot and you see the tooltip. Then, press Shift+Enter and you should be left with a persisting error tooltip

img

To get rid of this tooltip, you need to press Ctrl+P to open the print dialogue and it will disappear.

$\endgroup$
  • $\begingroup$ Nicely done. I was able to reproduce your results with MMA 11 on Linux, but was not able to create the persistent tooltip with MMA 10.1 on Windows 7. $\endgroup$ – LouisB Apr 18 '17 at 3:07
  • $\begingroup$ Can you explain the reasoning behind the use of the print panel? $\endgroup$ – Emilio Pisanty Apr 18 '17 at 6:27
  • $\begingroup$ @EmilioPisanty Unfortunately not. Calling the print dialogue is completely handled by the front end and you can call it with FrontEndExecute[FrontEndToken["PrintDialog"]]. The rest is a black box, but I assume that it redraws everything in order to print the notebook. That's a likely reason why the tooltip disappears. $\endgroup$ – halirutan Apr 18 '17 at 13:10
  • $\begingroup$ So I guess you found this behaviour when you actually needed to print something out, then ;-). $\endgroup$ – Emilio Pisanty Apr 18 '17 at 13:13
  • 2
    $\begingroup$ @EmilioPisanty Finding the Ctrl-P trick was by serendipity. I noticed the File->Revert menu selection for the first time and tried it. Later I read your post and happened to have a persistent tooltip showing at the time. But, when looked for the tooltip, it had been cleared. I put two and two together. Why did File->Revert work and would other menu selection(s) also work? Conjecture: any dialog that grays out the notebook will cause the Front End to clear the tooltip when the dialog closes. I proposed the Ctrl-P dialog as a way to test this conjecture. $\endgroup$ – LouisB Apr 18 '17 at 20:25
3
+50
$\begingroup$

Probably worth mentioning another possible way of removing a stuck persistent tool tip is to jump in and out of full screen mode by double pressing the F12 key.

$\endgroup$
  • $\begingroup$ Unfortunately, this does not work under Ubuntu 16.04 with Mathematica 11.1 and two screens. The tooltip stays where it is. $\endgroup$ – halirutan Apr 18 '17 at 13:03
  • $\begingroup$ This worked on my system. I'll give @halirutan's method a try with the next one that comes up. $\endgroup$ – Emilio Pisanty Apr 19 '17 at 9:43
1
$\begingroup$

Happened to me on ubuntu 18.04.2, nothing worked except lock/unlock the screen and it fixes the issue.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.