how to make widgets do not steal mouse events? #515
-
Recently I wanted to make a widget that can be freely dragged around the screen with the mouse cursor. I used the code from here: #303 and implemented roughly what I wanted: cut1.movFull code: https://pastebin.com/80hLdFps As you can see from the video, when I hold down the mouse button and drag the widget everything works as it is supposed to, but when I try to interact with something outside the widget, nothing happens, as if |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Here's a clearer example cut3.mov |
Beta Was this translation helpful? Give feedback.
-
You have a full screen layer open, it's the same thing as if you had an application in full screen. |
Beta Was this translation helpful? Give feedback.
the clickThrough property will make the whole window not receive events. To achieve your goal you have to set the input region of the window to the match the the size/position of your widget. You have to do this manually, I do something similar to make the transparent parts of my bar clickthrough.
Here is a snippet on how you can do that:
Note that
get_allocation()
returns the coordinates relative to the widgets parent, while input_region is…