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

With multiple monitors (one vertical), some of the wallpaper is displayed where it shouldn't be #276

Open
vinnydiehl opened this issue Apr 12, 2023 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@vinnydiehl
Copy link

It is almost as if the vertical monitor were rotated back horizontally, and laid out in the upper left corner of the image behind the screenshot, a portion of it spilling into what should be the top "black bar".

I am on Arch with awesomewm. Wallpapers are being set with feh- two different images, one of which is actually rotated vertically, no funny business there.

scrot-issue

@N-R-K
Copy link
Collaborator

N-R-K commented May 7, 2023

Some screenshots/pictures of the problem might be helpful.

(But I don't use multi-monitor, so someone who actually uses multi-monitor will need to step up to contribute a fix most likely.)

@N-R-K N-R-K added the bug Something isn't working label May 7, 2023
@vinnydiehl
Copy link
Author

Screenshot is attached above. :) This is the affected area:
231393219-33b85293-c252-49a9-a721-03b9881832ea
Expected: that area is all black.

If you have any theories as to what the problem might be, I can give it a stab when I get some time. How are the screens composed onto the final image?

@N-R-K
Copy link
Collaborator

N-R-K commented May 7, 2023

No theories as of now, but I think this is all the multimonitor related code:

scrot/src/scrot.c

Lines 893 to 923 in 724efba

static Imlib_Image scrotGrabShotMonitor(void)
{
int eventBase, errBase;
if (!XineramaQueryExtension(disp, &eventBase, &errBase))
errx(EXIT_FAILURE, "Xinerama extension not found");
int numScreens = 0;
XineramaScreenInfo *screens = XineramaQueryScreens(disp, &numScreens);
if (!screens && !numScreens)
errx(EXIT_FAILURE, "Xinerama not active");
if (!numScreens)
errx(EXIT_FAILURE, "Xinerama active but did not find any output device");
if (opt.monitor >= numScreens)
errx(EXIT_FAILURE, "monitor %d not found", opt.monitor);
XineramaScreenInfo *mon = &screens[opt.monitor];
/* Hack: pretend we were invoked in autoselect mode */
opt.autoselectX = mon->x_org;
opt.autoselectY = mon->y_org;
opt.autoselectW = mon->width;
opt.autoselectH = mon->height;
XFree(screens);
return scrotGrabAutoselect();
}

I don't really have any experience with Xinerama - but at a glance the code looks OK. But then I see that there's a Hack: comment in there :) So that's probably a good place to start investigating.

@N-R-K
Copy link
Collaborator

N-R-K commented May 7, 2023

And btw, what was the full scrot command that you used to take the screenshot. It would probably be useful for anyone trying to reproduce the issue.

@vinnydiehl
Copy link
Author

vinnydiehl commented May 8, 2023

It was just a raw scrot command (well, specifically scrot -e 'mv $f ~/pictures/screenshots 2>/dev/null' as an awesome keybind but I can't imagine -e with a mv is breaking this). To expand on what I tried to explain in my initial post, you see how it appears as though it is rendering the background image in its original orientation at 0,0?
231393219-33b85293-c252-49a9-a721-03b9881832ea
That might be a clue.

Another detail about my environment that may or may not be of importance: I'm running Arch as a VMware guest.

Also, would you believe it, I am no longer able to reproduce this at all. Just took a screenshot across all 3 monitors and it looks fine. Maybe it will come back after a reboot; or, maybe this was fixed with the update which hit the Community repo on 4/11 (a day before I posted this issue, not 100% sure if I had updated yet or not). I will investigate deeper in the coming days and will close this if I'm unable to get this to resurface. This has been a problem for some time before I reported it, so I'd be pleasantly surprised if it suddenly vanished for good. Nah, it's back after a reboot. I've been rather busy, but I will dive deeper into this when I have the time. If anyone else wishes to jump in and get the ball rolling, I'd appreciate that and would be happy to collaborate on your fork.

@N-R-K N-R-K added the help wanted Extra attention is needed label May 15, 2023
@wsslfnstr
Copy link

wsslfnstr commented Jul 27, 2023

download
Is this the same problem?
I have 2 displays in vertical mode but there is a black bar between the screens.

The white part is the page. The black and gray is not there on the displays

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants