Skip to content

Commit

Permalink
tooltipmanager should use low priority events so not to interfere
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Jan 3, 2024
1 parent 5086e59 commit bd912f2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions haxe/ui/tooltips/ToolTipManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package haxe.ui.tooltips;

import haxe.ui.Toolkit;
import haxe.ui.components.Label;
import haxe.ui.constants.Priority;
import haxe.ui.core.Component;
import haxe.ui.core.ItemRenderer;
import haxe.ui.core.Screen;
Expand Down Expand Up @@ -40,7 +41,7 @@ class ToolTipManager {
if (options == null) options = {};
if (options.tipData == null) options.tipData = { text: target.tooltip };
_toolTipOptions.set(target, options);
target.registerEvent(MouseEvent.MOUSE_OVER, onTargetMouseOver);
target.registerEvent(MouseEvent.MOUSE_OVER, onTargetMouseOver, Priority.LOW);
}

public function unregisterTooltip(target:Component) {
Expand Down Expand Up @@ -71,9 +72,9 @@ class ToolTipManager {

_lastMouseEvent = event;
_currentComponent = event.target;
event.target.registerEvent(MouseEvent.MOUSE_OUT, onTargetMouseOut);
event.target.registerEvent(MouseEvent.MOUSE_MOVE, onTargetMouseMove);
Screen.instance.registerEvent(MouseEvent.MOUSE_MOVE, onScreenMouseMove);
event.target.registerEvent(MouseEvent.MOUSE_OUT, onTargetMouseOut, Priority.LOW);
event.target.registerEvent(MouseEvent.MOUSE_MOVE, onTargetMouseMove, Priority.LOW);
Screen.instance.registerEvent(MouseEvent.MOUSE_MOVE, onScreenMouseMove, Priority.LOW);
startTimer();
}

Expand Down

0 comments on commit bd912f2

Please sign in to comment.