manateelazycat / popweb

Show popup web window for Emacs
146 stars 17 forks source link

Popweb multi-monitor incorrect popup in Windows & macOS #16

Open damoncro opened 2 years ago

damoncro commented 2 years ago

If I have multiple monitors, and Emacs is in second monitor, the (popweb-get-cursor-coordinate) may get (238 . -674), but popweb only shows in (238 . 0) position where it is in the first monitor.

Macos Emacs 27.2

damoncro commented 2 years ago

The fix did not fix, in macOS, the problem still exists. If Emacs is in second monitor, the popup window still shows up in the top part of the first monitor.

damoncro commented 2 years ago

Please check my screen setting, the top one is second monitor. image

MatthewZMD commented 2 years ago

Weird, I also have multi-monitor and I tried your display configuration, but I cannot reproduce your issue.

MatthewZMD commented 2 years ago

Can you go to popweb.py and print all the parameter values in adjust_render_pos(self, render_x, render_y, x_offset, y_offset, render_w, render_h, frame_x, frame_y, frame_w, frame_h): and give me a screenshot

damoncro commented 2 years ago

image

manateelazycat commented 2 years ago

微信图片_20211129184422

I have test scecond monitor as your layout, works fine.

MatthewZMD commented 2 years ago

How did you get a negative value for (window-absolute-pixel-position)?

chenyanming commented 2 years ago

I used surface pro 7 windows 10, same. I guess the fix only works in Linux?

chenyanming commented 2 years ago

@MatthewZMD Not sure, this is what it outputs.