dreamcat4 / skippy-xd

A full-screen Exposé-style standalone task switcher for X11.
GNU General Public License v2.0
98 stars 10 forks source link

Lazy transparency causes multimonitor bug #126

Open Beethoven-n opened 1 year ago

Beethoven-n commented 1 year ago

for some reason, when you enable lazytrans, going to another monitor and starting skippy causes this bug. just in case you need the context, i'm on xfce

on the right monitor (not set as primary) image

on the left monitor (set as primary) image

felixfung commented 1 year ago

Thank you for the bug report. Are you using xinerama? Can you please describe the behaviour and set up a bit more?

Beethoven-n commented 1 year ago

maybe i'm using xinerama? the setup is pretty much a stock xfce setup. the intended behavior should be that the applications are drawn to the light purple transparent window on the right monitor in these pictures, right? not sure that fixing xinerama behavior is the 100% correct solution because the applications are either drawn to the middle of the entire display or the left of the second display

felixfung commented 1 year ago

Can you please paste your config file here?

Beethoven-n commented 1 year ago

Can you please paste your config file here?

here u go https://paste.ee/p/7VWMQ

felixfung commented 1 year ago

I have some idea based on code inspection, but I do not have a second monitor to actually explore any functionality...

@vredesbyyrd you have a second monitor with or without xinerama set up in #66? Do you have any idea on this issue?

felixfung commented 1 year ago

Another question, when lazy transparency is turned off, the bug is not there? The behaviour would be, if you go to the right monitor and launch skippy, it would launch on the right monitor?

vredesbyyrd commented 1 year ago

Just saw this. I'm not home now but I should have access to my 2nd display tomorrow or next day. I'll look into it.

vredesbyyrd commented 1 year ago

I can reproduce what I assume is the same bug with lazytrans=true and xinerama=true, only tested on 2bwm + picom.

With above config options: Call skippy when cursor is on HDMI 1 (laptop [0], HDMI [1]).

Screenshot from 2023-06-30 21-38-19

With lazytrans=false everything looks as it should

Screenshot from 2023-06-30 21-35-47

For clarity, Laptop [0] is 1920x1080, HDMI [1] is 1920x1200 - that is why the screenshot has a black "bar" on laptop [0]...it's nothing to do with skippy.

I wish I had some thoughts on the cause, that said I have no use for lazytrans but am willing to test any new code since @felixfung does not have a 2nd monitor.

felixfung commented 1 year ago

Please try #150

@vredesbyyrd wondering if this bug/fix is the same as https://github.com/dreamcat4/skippy-xd/pull/66#issuecomment-1490898285?

vredesbyyrd commented 1 year ago

Tested. Unfortunately still broken with xinerama + lazytrans.

Xinerama + lazyTrans

Screenshot from 2023-07-04 13-59-37

Xinerama + lazyTrans=false

Screenshot from 2023-07-04 14-00-15

Regarding #66 (desktop pager + xinerama) also still is broken :/ In the below case there is at least 1 window in each workspace (0-3) on laptop screen [0]. On HDMI [1] there is a single window in workspace 0. In the pager, said window is placed where workspace 1 is.

Screenshot from 2023-07-04 14-09-50

Admittedly I have not put a lot of thought into this, but the only way I can envision the pager metaphor working with multiple displays is to treat each xinerama display as its own workspace - so a xinerama display would be visually represented like any "normal" workspace would.

felixfung commented 1 year ago

From code inspection I guess the direction I was going was incorrect.

Can you please try with -S option to show detailed debug prints, and look for this line:

https://github.com/dreamcat4/skippy-xd/blob/ae6de07a670e97ad5c13b5b8a21477e1c49c8ca0/src/mainwin.c#L378

I hope the numbers would tell us where the bug is.

vredesbyyrd commented 1 year ago

So I tried:

skippy-xd --config /home/clu/.config/skippy-xd/skippy-xd.rc --start-daemon -S | grep --line-buffered "screen"

And grep is not finding any error's related to screen, hmm.... I can post an entire log but nothing appears relevant to me.

felixfung commented 1 year ago

Oops...

Most probably because that line is wrapped around #ifdef DEBUG .

The simplest way to deal with it is to remove all the #ifdef DEBUG within mainwin_update(), compile and test.

Beethoven-n commented 1 year ago

Please try #150 not quite sure how to test code that's on a PR, sorry

felixfung commented 1 year ago

@Beethoven-n the repo has been forked to https://github.com/felixfung/skippy-xd, and the bug is fixed.

@vredesbyyrd with the fork, multi-monitor bugs has been fixed, and paging supports multi-monitor/xinerama situations. I quite like the final effect, I think you may like it also.

vredesbyyrd commented 1 year ago

with the fork, multi-monitor bugs has been fixed, and paging supports multi-monitor/xinerama situations. I quite like the final effect, I think you may like it also.

Thanks for the heads up. I'm out of town for 2 weeks without access to a display, but I very much look forward to trying your new multi-monitor support + paging asap, very intrigued!