enter-event and leave-event happens twice when the affectsInputRegion is true
Affected version
- Ubuntu 20.04
- X11
- GNOME 3.36.1
Bug summary
When affectsInputRegion is true for Main.layoutManager.addChrome(), enter-event (or leave-event) can trigger twice.
Extension code to test:
binElement = new St.Bin({
reactive: true,
can_focus: true,
track_hover: true,
width: 100,
height: 100,
});
binElement.set_position(0, 0);
binElement.connect("enter-event", function() {
log('entered);
});
binElement.connect("leave-event", function() {
log('left');
});
Main.layoutManager.addChrome(binElement, { affectsInputRegion: true });
Steps to reproduce
- move mouse into the binElement while there isn't any app window under it (only desktop background).
- the enter-event happens twice (should happen once).
- move mouse into the binElement while there is an app window under it.
- the enter-event happens once.
The same thing happens to the leave-event.
Relevant logs, screenshots, screencasts etc.
Watch this video:
Edited by Javad Rahmatzadeh