mPyKen / ScreenAreaShare

Share selected area of the screen in applications that do not support this, e.g. Teams.
MIT License
148 stars 19 forks source link

fix #13 #14

Closed joeskeen closed 6 months ago

joeskeen commented 1 year ago

See #13 for details of the problem and the troubleshooting steps I took to arrive at this solution.

This pull request is a draft until I can test on all platforms:

Testing complete; ready for review!

mPyKen commented 1 year ago

Also, I am wondering about the display_id property that don't match - does that happen only on your linux machine or on all machines? I tested this on my local (Manjaro Linux) machine and it found the display_id correctly. I wonder if this is hardware (monitor) related or software related

joeskeen commented 1 year ago

Another thing I noticed today when trying to use this version - at least in Linux Mint the capture window seems to capture the mouse click events, and you can't click or drag through the capture window. I'll want to look into fixing this as well.

joeskeen commented 1 year ago

sorry about the close and re-open - 3-year-old wanted to push buttons on my keyboard :facepalm:

mPyKen commented 1 year ago

Also, I am wondering about the display_id property that don't match - does that happen only on your linux machine or on all machines? I tested this on my local (Manjaro Linux) machine and it found the display_id correctly. I wonder if this is hardware (monitor) related or software related

I am using i3, I can confirm clicking through does not really work. It seems to be alternating between letting mouse events through and not. These logs from xev are being repeated:

...
LeaveNotify event, serial 34, synthetic NO, window 0x7600001,
    root 0x1f4, subw 0x0, time 109828541, (41,519), root:(901,540),
    mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
    focus NO, state 16

EnterNotify event, serial 34, synthetic NO, window 0x7600001,
    root 0x1f4, subw 0x0, time 109828550, (10,522), root:(870,543),
    mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
    focus NO, state 16

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  244 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
...

whereas it should get MotionNotify events if not trying to go through the capture window:

...
MotionNotify event, serial 34, synthetic NO, window 0x3000001,
    root 0x1f4, subw 0x0, time 109966947, (297,651), root:(1157,672),
    state 0x10, is_hint 0, same_screen YES
...