Tooltip Bugfix After 22 Years

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 666
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California

Tooltip Bugfix After 22 Years

Unread post by RealityRipple » 2023-10-28, 09:26

bug #148624 got fixed with a single "doc->HasFocus" call. Now begins the huge debate as to whether non-focused applications should show tooltips.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35653
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Tooltip Bugfix After 22 Years

Unread post by Moonchild » 2023-10-28, 10:17

RealityRipple wrote:
2023-10-28, 09:26
Now begins the huge debate as to whether non-focused applications should show tooltips.
*crickets*
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4984
Joined: 2015-12-09, 15:45

Re: Tooltip Bugfix After 22 Years

Unread post by moonbat » 2023-10-28, 10:41

A tooltip by definition exists to show a little more detail about the UI element visible below the mouse pointer; if there isn't one due to being covered up by another window, it makes no sense to be shown and will only confuse the slower witted majority.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 204
Joined: 2020-03-02, 16:04

Re: Tooltip Bugfix After 22 Years

Unread post by Nuck-TH » 2023-10-28, 11:57

moonbat wrote:
2023-10-28, 10:41
A tooltip by definition exists to show a little more detail about the UI element visible below the mouse pointer; if there isn't one due to being covered up by another window, it makes no sense to be shown and will only confuse the slower witted majority.
Out of focus absolutely doesn't mean that window is obscured by another one.

Well, windows itself inconsistent about it. Take explorer for example - inside unfocused window tooltips doesn't show, but they do on titlebar buttons. Symbol table shows tooltips always. Some other system applications behave like explorer.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35653
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Tooltip Bugfix After 22 Years

Unread post by Moonchild » 2023-10-28, 12:48

Nuck-TH wrote:
2023-10-28, 11:57
Take explorer for example - inside unfocused window tooltips doesn't show, but they do on titlebar buttons.
I never understood why titlebar buttons have to have captions anyway (if their function is not clear, then you're having bigger issues...), let alone on background windows. But one could argue that window frames are system elements and since your desktop environment is always focused when you're using it, it would make sense in that case. Application content is different from its window -- Linux actually makes a much clearer point of that.
moonbat wrote:
2023-10-28, 10:41
if there isn't one due to being covered up by another window
This may or may not be the case, but to be accurate in that case you'd have to keep track of every window inside every application to know if a mouse position is actually over THIS application or covered up. The simple and I think logical solution is to not show them for non-active windows (unless you are using an auto-raise alike behaviour in your system, shifting focus based on mouse position, but even then, you can just go by the focus...)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: Tooltip Bugfix After 22 Years

Unread post by Kris_88 » 2023-10-28, 13:21

Logically the rule is simple. If you can click on a button and it will perform an action, you will also be able to see a tooltip. If the tooltip is not displayed due to focus on another window, then clicking should not work either. At the same time, simply hovering the mouse over a button should not change focus.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35653
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Tooltip Bugfix After 22 Years

Unread post by Moonchild » 2023-10-28, 13:54

Kris_88 wrote:
2023-10-28, 13:21
Logically the rule is simple.
Kris_88 wrote:
2023-10-28, 13:21
If the tooltip is not displayed due to focus on another window, then clicking should not work either.
That rule doesn't work when you're dealing with cascading windows. When you click, you transfer the focus to the previously background application to perform the click action. a hover action doesn't do that, as you yourself say. So you can't apply this rule as it's paradoxical in that context. If you want to apply that rule then you have to fundamentally change how focus-shifting works (i.e. requiring a click to change focus without performing any action). What would confuse the user more: a tooltip not displaying on a control that is in an application that doesn't have focus, OR their "clicking doing nothing"? something something cake something eating.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: Tooltip Bugfix After 22 Years

Unread post by Kris_88 » 2023-10-28, 14:26

Moonchild wrote:
2023-10-28, 13:54
What would confuse the user more: a tooltip not displaying on a control that is in an application that doesn't have focus, OR their "clicking doing nothing"?
I'm just saying that the ability to perform an action on a click (with automatic focus change if necessary) and displaying a tooltip are related things. I can click on a button in an inactive window and know that the focus will change and the action will be performed (I don’t even always notice that the window is inactive). Nobody doubts this. Since this is so, the tooltip should work in an inactive window, because it is needed to explain the action that will be performed when clicked. Since the click will work, the tooltip should also work.

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Tooltip Bugfix After 22 Years

Unread post by athenian200 » 2023-10-28, 17:24

Off-topic:
In case anyone was wondering, I checked and we apparently have this fix already:

https://repo.palemoon.org/MoonchildProd ... 607daa7966
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35653
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Tooltip Bugfix After 22 Years

Unread post by Moonchild » 2023-10-28, 19:22

Kris_88 wrote:
2023-10-28, 14:26
Since this is so, the tooltip should work in an inactive window, because it is needed to explain the action that will be performed when clicked.
As already explained it's not practical to do this in a way that would be technically sane, and the result otherwise would be the obvious problem with disembodied tooltips showing over applications that they don't belong to, which is the bug that's been fixed with this.
If you want the additional optional help, activate the window.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35653
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Tooltip Bugfix After 22 Years

Unread post by Moonchild » 2023-10-28, 19:22

athenian200 wrote:
2023-10-28, 17:24
Off-topic:
In case anyone was wondering, I checked and we apparently have this fix already:

https://repo.palemoon.org/MoonchildProd ... 607daa7966
correct, it will be in the upcoming release.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: Tooltip Bugfix After 22 Years

Unread post by Kris_88 » 2023-10-28, 20:22

Moonchild wrote:
2023-10-28, 19:22
If you want the additional optional help, activate the window.
Sometimes it is not obvious that a window is not active. And the lack of a tooltip is annoying.
And, of course, tooltips are needed for new applications that I am not very familiar with. Therefore, I personally don’t care how tooltips will work in Pale Moon. But logic, Moonchild, it's all about logic...
U1.png
You do not have the required permissions to view the files attached to this post.