Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: conky_on_mouse_event - mouse click generates mouse_enter #2047

Open
a1bert01 opened this issue Sep 25, 2024 · 2 comments
Open

[Bug]: conky_on_mouse_event - mouse click generates mouse_enter #2047

a1bert01 opened this issue Sep 25, 2024 · 2 comments
Assignees
Labels
bug Bug report or bug fix PR display: x11 Issue related to X11 backend mouse events Issue or PR related to mouse events

Comments

@a1bert01
Copy link

What happened?

after updating ubuntu 22.04 to 24.04 and conky 1.19.6 -> 1.21.7 (appimage)

xfwm4

mouse clicks are propagated as mouse_enter (without mouse_release) in conky_on_mouse_event

may be similar to #1495

Version

1.21.7

Which OS/distro are you seeing the problem on?

Ubuntu

Conky config

No response

Stack trace

No response

Relevant log output

conky: desktop window (0x1600013) is subwindow of root window (0x544)
conky: window type - dock
conky: drawing to created window (0x5800001)
conky: drawing to double buffer
conky: FOUND: console
conky: FOUND: ncurses
conky: FOUND: file
conky: FOUND: http
conky: FOUND: x11
conky: FOUND: wayland
conky: 'xubuntu' x11 session running 'XFCE' desktop
mouse_enter
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_enter
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_leave
@a1bert01 a1bert01 added bug Bug report or bug fix PR triage Issue that hasn't been verified labels Sep 25, 2024
@Caellian Caellian added display: x11 Issue related to X11 backend mouse events Issue or PR related to mouse events and removed triage Issue that hasn't been verified labels Sep 29, 2024
@Caellian
Copy link
Collaborator

Caellian commented Sep 29, 2024

Question: How are mouse events reported if you make it a normal window instead?

My guess is this happens due to conky being a dock and XFCE not reporting click event - i.e. dock is focused on XFCE when mouse is pressed, and gets unfocused when released. Some conky logic might be preventing clicks when not focused and those events might be reported out of order.

Fix notes

  • IFF out of order: collect events into a vector, order them based on some requirements (e.g. move enter events from same poll before click events if they happen in close proximity).
  • Should check whether similar behavior occurs on non-XFCE desktops when in dock mode.
    • IFF only enter/leave events are produced, produce enter and click event if mouse button is down.
      • Edge case: user clicks button outside of conky and drags already pressed pointer into conky.

@Caellian Caellian self-assigned this Sep 29, 2024
@Caellian Caellian added the need details Issue that's waiting for more details from reporter label Sep 29, 2024
@a1bert01
Copy link
Author

it's the same in normal window mode:

conky: desktop window (0x1600013) is subwindow of root window (0x544)
conky: window type - normal
conky: drawing to created window (0x2c00001)
conky: drawing to double buffer
conky: FOUND: console
conky: FOUND: ncurses
conky: FOUND: file
conky: FOUND: http
conky: FOUND: x11
conky: FOUND: wayland
conky: 'xubuntu' x11 session running 'XFCE' desktop
mouse_move  <-- mouse in conky
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_leave   <-- click
mouse_leave   <-- click
mouse_leave   <-- click
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_leave <-- mouse out of conky window

moving to conky window with holding button pressed:

conky: desktop window (0x1600013) is subwindow of root window (0x544)
conky: window type - normal
conky: drawing to created window (0x2c00001)
conky: drawing to double buffer
conky: FOUND: console
conky: FOUND: ncurses
conky: FOUND: file
conky: FOUND: http
conky: FOUND: x11
conky: FOUND: wayland
conky: 'xubuntu' x11 session running 'XFCE' desktop
conky: Unable to load image '/mnt/sopa/motion/tmp/rotated-1.jpg'
mouse_enter  <-- pressing button outside conky & moved into conky & released button - all reported as single mouse_enter <-- click 
mouse_enter <-- click
..
mouse_move
mouse_move
mouse_move <-- leaving conky
mouse_move
mouse_move
mouse_leave <-- mouse out of conky 
mouse_move <-- moving back to conky 
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_move
mouse_leave <-- click 
mouse_leave <-- click
mouse_move
mouse_move
mouse_leave

( all clicks are reported on button pressed no event on button release)

@Caellian Caellian removed the need details Issue that's waiting for more details from reporter label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report or bug fix PR display: x11 Issue related to X11 backend mouse events Issue or PR related to mouse events
Projects
None yet
Development

No branches or pull requests

2 participants