-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Maximize window on primary screen gives small window #264
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
Hi @afhp-2020, Odd -- this is one of these things I've never been able to reproduce. Issue #250 was recently created for (I think) the issue you're describing. If you revert 57050fb does this help at all? If not, I'll have to roll my sleeves up and take a look. Is there anything in your config which might be relevant for me to reproduce this? I maximize windows all the time on different monitors, at different resolutions and don't encounter a problem, so if it's failing for you, I'm guessing there'll be some sort of config option you have which I don't. |
Hi Thomas, I did see #250 but figured it would be a different issue since in my case it's the primary that misbehaves. Is there an easy way to revert a specific commit (I still don't get the hang of git) or should I just manually change the file back in my local tree ? As for other elements in my config, I haven't modified it in months and it was working normally until today when I updated and rebuilt. |
Hi @afhp-2020 I suspect the comment about "monitor 2" is misleading, as the maths applies to any monitor -- it's just that it was the second monitor where the issue was noticed. In terms of what you need to do in git to revert that commit, you just need to type:
Then do the usual
... to put you back to where you were, which also undoes the git revert change so that you're back to how things were. If you're feeling really adventurous, you could also look at how to use |
Getting weirder. As I mentioned, no change locally in quite a while, I think I rebuilt shortly after 1.0.0 got release status and did not observe any change or bug at that point. With the current (latest) code, I'll let it rest for the night and do further and more complete tests tomorrow. |
Right. Might be related to #143 |
Hello Thomas, Before trying to delve into git bisect, here are a few points:
That's a start, I'll try and see if I can refine it any further. |
Hi @afhp-2020 OK, cool. So you're saying this is fixed? |
No, I'm saying I had a backup to a working version for once :) Tried bisecting (from within my "broken" build dir) and arrived at:
Both this issue and #265 appear at the same time. |
OK. If you "git revert" this commit, do things work as expected? |
Trying to simply revert that commit led to a conflict. Not sure I resolved it right. That said,
(line numbers from and both this and #265 are fixed. Resulting build identifies itself as (from FvwmConsole) Hope this helps. |
Hi @afhp-2020 OK. So that change was introduced by me (90f7b45) to fix a problem where I suspect #251 is related somehow as well. I'll have to think about how best to fix this. |
I agree with Thomas this issue might be related to the #251 I proposed to fix maximize on monitor 2. |
I tested the latest git version - fvwm3 1.0.1 (1.0.0-48-ge3d35880), and was not able to reproduce this 'maximize gives a small window'. At a moment, I thought I had reproduced the default, but I think I fell into a normal behavior: I moved a maximized window from monitor 2 to monitor 1, then wanted to maximize it on monitor 1, as my monitor 2 is smaller. This second 'maximize' is then treated as 'un-maximize', giving a smaller window. It's because the 'move' keeps the maximized status, which happens to be erroneous in my bigger monitor 1 case. I can't either reproduce #265: PositionPlacement works fine for me. |
Hi @phileimer Thanks for checking this. I've not been able to reproduce this either. @afhp-2020 -- is there any other bits of information/setup you can detail to us which might help? @phileimer -- with respect to the move example, that's the correct behaviour at the moment. |
Hi Thomas, Sorry for the lag, didn't check messages recently. As I mentioned, this is a pretty stable configuration that worked for months on end before this appeared. I really have no idea. The only thing I can think of that might remotely be relevant is the atypical screen disposition with the bigger primary is landscape mode and the smaller secondary rotated counter-clockwise to portrait, aligned at the bottom. No clue otherwise, and no inkling as to where the vertical size of 211 came from, or why PositionPlacement is affected at the same time (then again, also only in Y). That's probably not very helpful, I'm sorry. I really can't see it. |
Hi @afhp-2020 Ah -- thanks for the extra information! I think you've hit the nail on the head. If you've got a rotated display, then that might explain things, similar to what's happening in #271. Can you put the output of |
Here are the new, clean log and the Xrandr output. |
I'm seeing a similar issue where windows are being generated too wide with only one display involved. The EwmhBaseStruts in my config is set to:
While maximized windows are offset to the right correctly, they have a width of 1366px instead of 1232px. For reference, Xrandr reports the resolution of the display as 1366x768+0+0. Running git bisect led me to commit --- a/fvwm/ewmh.c
+++ b/fvwm/ewmh.c
@@ -1109,8 +1109,8 @@ void EWMH_GetWorkAreaIntersection(
}
nx = max(*x, area_x);
ny = max(*y, area_y);
- nw = min(*x + *w, area_x + area_w);
- nh = min(*y + *h, area_y + area_h);
+ nw = min(*x + *w, area_x + area_w) - nx;
+ nh = min(*y + *h, area_y + area_h) - ny;
*x = nx;
*y = ny;
``
I'm not sure if this is the same issue considering I only have one display, but since it seems to stem from the same commit, I thought I'd post my findings here in case it helps. |
When computing and setting the EWMH work area (which also implies EwmhBaseStrut settings), calculate the struts relative to the overall screen widths and heights. Certain monitors with certain resolutions combined will often have "dead space" which calculating per-monitor is a distorted value. The window's offset against the work area is calculated when placing/maimizing a window, so doesn't incur per-monitor offsets. Fixes #271, fixes #265, fixes #264, fixes #250
Hello all, Please can I ask you to test the
In talking to @lgsobalvarro on IRC, he's helped test this, but I want to gather as much information as I can to ensure I've not missed anything. |
When computing and setting the EWMH work area (which also implies EwmhBaseStrut settings), calculate the struts relative to the overall screen widths and heights. Certain monitors with certain resolutions combined will often have "dead space" which calculating per-monitor is a distorted value. The window's offset against the work area is calculated when placing/maimizing a window, so doesn't incur per-monitor offsets. Fixes #271, fixes #265, fixes #264, fixes #250
FTR: This behaviur is identical on both FVWM 2 and FVWM 3. When primary monitor is smaller than secondary, EwmhBaseStruts is used from the bigger one. If for example EwmhBaseStruts is 0 0 0 86 and there is panel on the bottom of the screen, Maximize on single headed system will put window up to the panel in pixel precision. On above described setup, if for example primary is 1400x1050 and secondary monitor 1920x1080, approx. 1/4 of the panel will get covered with maximized window. If primary is even smaller (tested with 1600x900), there will be no visual difference between "Maximize" and "Maximize ewmhiwa". |
Hi @ThomasAdam, |
Hi @phileimer Thanks. Are you also therefore confirming that there's been no regressions as far as you can tell? I know you had that weird issue where maximizing failed on your second monitor. |
I confirm: no regression noticed. |
Thanks! Given other feedback I've had outside of this thread, I'm inclined to merge this code and create separate issues as/when things come up, as I'm sure they will. ;) |
When computing and setting the EWMH work area (which also implies EwmhBaseStrut settings), calculate the struts relative to the overall screen widths and heights. Certain monitors with certain resolutions combined will often have "dead space" which calculating per-monitor is a distorted value. The window's offset against the work area is calculated when placing/maimizing a window, so doesn't incur per-monitor offsets. Fixes #271, fixes #265, fixes #264, fixes #250
When computing and setting the EWMH work area (which also implies EwmhBaseStrut settings), calculate the struts relative to the overall screen widths and heights. Certain monitors with certain resolutions combined will often have "dead space" which calculating per-monitor is a distorted value. The window's offset against the work area is calculated when placing/maimizing a window, so doesn't incur per-monitor offsets. Fixes #271, fixes #265, fixes #264, fixes #250
Sorry, I couldn't get around to checking this branch in time. I updated from master today (with this commit included) and confirm the issue is fixed, as well as #265. |
Hi @afhp-2020 Glad to hear it! Thanks for letting me know. |
Version 1.0.1 (1.0.0-45-gb1072488), built yesterday evening.
Xrandr: primary 1920x1200+0+240, secondary 900x1440+1920+0.
Any window maximized on secondary screen behaves normally and goes fullscreen on that display.
Any window maximized on primary screen ends up, as per FvwmIdent, sized 1862x211. The width is correct, taking into account struts for a panel; the height, obviously, has been miscalculated.
I had not updated Fvwm in quite a while, no idea when this appeared.
The text was updated successfully, but these errors were encountered: