! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Problem with maximized window in xfwm4 4.13
Status:
RESOLVED: FIXED

Comments

Description Marcos Mello 2017-10-26 20:19:48 CEST
Created attachment 7388 
Fullscreen problem

I migrated to xfwm4-git (g80453816, Xpresent and Epoxy enabled) and Terminal does not go fullscreen anymore. See attached screen capture.

This is an Arch system, using up-to-date XFCE 4.12 stack (xfce4-terminal 0.8.6 compiled with VTE3/GTK3). Intel GM45, Xorg modesetting driver.

Besides appearance tweaks (font, colors), the only customization I have is GTK_OVERLAY_SCROLLING=0.
Comment 1 Egmont Koblinger 2017-10-26 23:36:25 CEST
Sounds like an xfwm4 bug to me.
Comment 2 Igor editbugs 2017-10-26 23:41:33 CEST
Does gnome-terminal have the same fullscreen problem under xfwm 4.13?
Does fullscreen work as expected under xfwm 4.12?
Comment 3 Marcos Mello 2017-10-27 01:30:02 CEST
(In reply to Igor from comment #2)
> Does gnome-terminal have the same fullscreen problem under xfwm 4.13?

Sorry, I am using the wrong word! Fullscreen (F11) is working.

This is when I maximize the window. Other apps like Chromium, Firefox, Mousepad, Thunar, Ristretto are fine.

Yes, GNOME Terminal is also exhibiting similar problem when maximized (capture attached).

> Does fullscreen work as expected under xfwm 4.12?

Yes, XFCE Terminal window was fine when maximized in xfwm 4.12.
Comment 4 Marcos Mello 2017-10-27 01:31:27 CEST
Created attachment 7389 
GNOME Terminal maximized
Comment 5 Igor editbugs 2017-10-27 02:03:22 CEST
I have updated my Arch system to the latest git version of xfwm4, and both fullscreen and maximized modes are fine here.

$ xfwm4 --version
	This is xfwm4 version 4.13.0git.80453816 (revision 80453816) for Xfce 4.12
	Released under the terms of the GNU General Public License.
	Compiled against GTK+-2.24.31, using GTK+-2.24.31.

	Build configuration and supported features:
	- Startup notification support:                 Yes
	- XSync support:                                Yes
	- Render support:                               Yes
	- Xrandr support:                               Yes
	- Xpresent support:                             Yes
	- Embedded compositor:                          Yes
	- Epoxy support:                                Yes
Comment 6 Igor editbugs 2017-10-27 02:17:24 CEST
Actually, I think I know what you're talking about: I can see small gaps between the panel (which I have at the bottom of the screen) and the lower border of the terminal window, as well as between the right side of the screen and the right window border. The bottom gap is bigger when the terminal window has only one tab, and is really tiny with two tabs.
The same happens when maximizing gnome-terminal and xterm windows.

I'm not sure whether there is something that can be done from the terminal side.
Comment 7 Marcos Mello 2017-10-27 10:48:53 CEST
In xfwm 4.12 there was no gap at all. What changed in xfwm 4.13?
Comment 8 Marcos Mello 2017-10-27 12:04:34 CEST
Created attachment 7391 
Video showing the problem
Comment 9 Egmont Koblinger 2017-10-27 15:12:41 CEST
> What changed in xfwm 4.13?

Apparently it started to respect geometry hints (resize increments) in maximized mode rather than ignoring it. I don't find this a wise idea, I think it's better if it ignores the geometry hints in maximized mode (there's a reason it's called "hints" and not "rules") and truly maximizes the window.

> I'm not sure whether there is something that can be done from the terminal side.

Not really, I'm afraid.
Comment 10 Igor editbugs 2017-10-27 15:25:14 CEST
> > What changed in xfwm 4.13?
> Apparently it started to respect geometry hints (resize increments) in
> maximized mode rather than ignoring it. I don't find this a wise idea, I
> think it's better if it ignores the geometry hints in maximized mode
> (there's a reason it's called "hints" and not "rules") and truly maximizes
> the window.
Yeah, that would explain why tilix is not suffering from this problem - because it isn't setting geometry hints.

> > I'm not sure whether there is something that can be done from the terminal side.
> Not really, I'm afraid.
If only unset geometry hints when going into maximized mode... don't think I like this idea, though.
Comment 11 Egmont Koblinger 2017-10-27 15:45:37 CEST
(In reply to Igor from comment #10)

> Yeah, that would explain why tilix is not suffering from this problem -
> because it isn't setting geometry hints.

Which totally makes sense for them. As soon as you have anything more complex layout than a single terminal, or a few terminals next to each other (all along one axis) all having the same font size, geometry hints can no longer be properly defined.

> If only unset geometry hints when going into maximized mode... don't think I
> like this idea, though.

We're just working on fixing gnome-terminal for wayland/gnome-shell/mutter, there's tons of bugs with geometry there. See e.g. https://bugzilla.gnome.org/show_bug.cgi?id=789356 and tons of other bugs linked from there. I can't yet see what solution we'll settle with. Once we figure out, you might want to consider following us. Eventually at some point perhaps people will start using xfce4-terminal over wayland/gnome-shell/mutter/etc. (rather than xfce4 environment).

During these discussions I was surprised to learn that it _is_ communicated to the app (xfce4-terminal) if it's in maximized state. So technically yup you could uninstall geometry hints then and restore again when unmaximized. What I'm not sure about is whether it's too late then or not. E.g. it could be that xfwm4 maximizes leaving that gap, then you remove the geometry hints, but then it doesn't decide to enlarge it even further to fill the gap. Don't know, you should try, and of course expect anything you change to fix the behavior in a few window managers and in the mean time break it in some others :P I can fully understand you if you don't feel like killing time with this.

I guess xfwm4 developers should be looped in here whether it was an intentional change on their side, what was its rationale, and whether they'd be okay with reverting.
Comment 12 Olivier Fourdan editbugs 2017-10-29 12:11:51 CET
This isn't new at all, xfwm4 has always supported geometry hints of course, but it would ignore resize increment for maximized or fullscreen windows, on purpose, precisely to avoid this issue...

So this is a regression, most likely introduce by commit aee8b25 (https://git.xfce.org/xfce/xfwm4/commit/?id=aee8b25).

Can you try w/out this commit?
Comment 13 Marcos Mello 2017-10-29 13:27:25 CET
Reverting aee8b25 solves the issue!
Comment 14 Igor editbugs 2017-10-30 01:05:59 CET
Yes, reverting the specified commit seems to have fixed the issue for me. Thanks, Olivier.
Marcos, thanks for reporting this!
Comment 15 Igor editbugs 2017-10-30 01:12:55 CET
(In reply to Egmont Koblinger from comment #11)
> We're just working on fixing gnome-terminal for wayland/gnome-shell/mutter,
> there's tons of bugs with geometry there. See e.g.
> https://bugzilla.gnome.org/show_bug.cgi?id=789356 and tons of other bugs
> linked from there. I can't yet see what solution we'll settle with. Once we
> figure out, you might want to consider following us. Eventually at some
> point perhaps people will start using xfce4-terminal over
> wayland/gnome-shell/mutter/etc. (rather than xfce4 environment).
Egmont, thanks for referring to this bug. I'll need to find some time to read through it and related bugs.
Comment 16 Git Bot editbugs 2017-12-06 09:56:03 CET
Olivier Fourdan referenced this bugreport in commit 54db88acb7e1988d5c39722d639a0347c99fd7b0

Fix maximized size increment regression

https://git.xfce.org/xfce/xfwm4/commit?id=54db88acb7e1988d5c39722d639a0347c99fd7b0
Comment 17 Marcos Mello 2017-12-07 18:43:26 CET
Commit 54db88ac does not fix it completely. Sometimes (let's say 2 in 10 attempts) I need to click twice on the maximize button, see attached video.

This is xfwm4 version 4.13.0git.6a44ecc3 (revision 6a44ecc3) for Xfce 4.12
Released under the terms of the GNU General Public License.
Compiled against GTK+-3.22.26, using GTK+-3.22.26.

Build configuration and supported features:
- Startup notification support:                 Yes
- XSync support:                                Yes
- Render support:                               Yes
- Xrandr support:                               Yes
- Xpresent support:                             Yes
- Embedded compositor:                          Yes
- Epoxy support:                                Yes
- KDE systray proxy (deprecated):               No
Comment 18 Marcos Mello 2017-12-07 18:46:27 CET
Created attachment 7475 
Video showing the problem 2
Comment 19 Git Bot editbugs 2017-12-08 20:20:00 CET
Olivier Fourdan referenced this bugreport in commit 87cbe0e3d01d467c14aa2bb4d3656bf6b39a4247

client: Make sure to redraw when removing maximized

https://git.xfce.org/xfce/xfwm4/commit?id=87cbe0e3d01d467c14aa2bb4d3656bf6b39a4247
Comment 20 Olivier Fourdan editbugs 2017-12-08 20:22:10 CET
For some reason, I fail to reproduce the issue here.

But from the screencast, that looks like the client is issuing a ConfigureRequest by itself, which lead to the window being un-maximized. I think this particular issue is a client issue, not related to commit aee8b25.

But that shows another issue with repainting the frame...
Comment 21 Marcos Mello 2017-12-08 21:43:17 CET
Thank you, Olivier. Now the window is not glitched anymore.

Igor, what do you think? I still get erroneous behaviour (last screencast) sometimes, not always.
Comment 22 Viktor Odintsev editbugs 2017-12-10 16:17:11 CET
xfce4-terminal itself only configures size hints once. Then GDK makes XResizeWindow call each time window gets maximized which probably causes ConfigureRequest. I'm not sure GTK developers can do anything with this.
Comment 23 Andrey Vihrov 2017-12-11 21:59:33 CET
> For some reason, I fail to reproduce the issue here

Running xfwm4 4.13.0git.02a795fc and xfce4-terminal 0.8.6, the problem is reproducible only sometimes (perhaps a race condition?). For me this works to reproduce the issue:

1. Open a new terminal window
2. Maximize it
3. Restore it
4. Repeat steps 2. and 3.

At some point (usually after 5-6 iterations) the problem will appear.
Comment 24 Andrey Vihrov 2017-12-11 22:01:48 CET
P.S. VTE3 version is 0.50.2 and GTK3 version is gtk3 3.22.26+47+g3a1a7135a2.
Comment 25 Igor editbugs 2017-12-15 03:10:15 CET
I(In reply to Andrey Vihrov from comment #23)
> 1. Open a new terminal window
> 2. Maximize it
> 3. Restore it
> 4. Repeat steps 2. and 3.
> 
> At some point (usually after 5-6 iterations) the problem will appear.

I can confirm the issue on my Arch machine with xfwm4-git and xfce4-terminal-git.
Comment 26 Git Bot editbugs 2018-07-27 22:35:21 CEST
Olivier Fourdan referenced this bugreport in commit 11421dc28cf3a4ea6598eb32f48dc39da2c078db

client: Make sure to redraw when removing maximized

https://git.xfce.org/xfce/xfwm4/commit?id=11421dc28cf3a4ea6598eb32f48dc39da2c078db
Comment 27 Igor editbugs 2018-11-03 16:30:16 CET
I'm still experiencing maximize/unmazimize problems with xfwm4 4.13.0 and 4.13.1. When opening a new terminal window and starting to maximize/unmaximize it, after a number of repetitions (from 2 to say 10 or 15) the window wouldn't unmaximize. This happens with the current versions of xfce4-terminal and gnome-terminal.
Reverting to xfwm4 4.12.5 solves the issue.
Comment 28 Tomasz Gąsior 2018-12-26 07:37:39 CET
Created attachment 8199 
video showing this bug on b1248a7
Comment 29 Tomasz Gąsior 2018-12-26 07:38:26 CET
Created attachment 8200 
this patch fixes bug, applied to b1248a70
Comment 30 Tomasz Gąsior 2018-12-26 07:40:10 CET
I still have this bug with xfwm4 from master running on Arch Linux. I fixed it by reverting changes in client.c file made in aee8b25a ( Do not prevent ALT+Mouse resizing for borderless maximized windows. ). I sent video showing the bug and patch file which is completely fixing this bug on my machine.
Comment 31 Olivier Fourdan editbugs 2019-01-09 18:18:14 CET
Except that  attachment 8200   is not correct, it's reverting partially commit aee8b25a so it will most deny resize for bordeless maximized windows.

I suspect we're fighting against a broken client which sends us configure requests when maximizing because of size increments or something.

I reiterate my call to drop size increments in xfce4-terminal.

Can you reproduce with, say, konsole?
Comment 32 Igor editbugs 2019-01-09 18:21:22 CET
Olivier, xfce4-terminal isn't the only one doing that - gnome-terminal is another example.
I don't agree the behavior is "broken" - this is something that terminal emulators have been doing for years, and xfwm4 used to support that.
Comment 33 Olivier Fourdan editbugs 2019-01-09 18:27:08 CET
xfwm4 still supports that, but the client is sending us a ConfigureRequest which means basically “resize me”, in which case xfwm4 rightfully removes the maximized state whenn a client resize itself.

The behavior described is typical of a race condition when clients fight against the window manager.

Previously, we would simply deny the resize for maximized windows, whereas now with aee8b25a we allow the client to resize itself, so this bug shows.
Comment 34 Olivier Fourdan editbugs 2019-01-09 18:30:10 CET
You could narrow the scope to find the culprit:

Does it show with xterm?
Does it show with gnome-terminal?
Does it show with tilix?


If it shows with gnome-terminal and xfce4-terminal, but not in tilix then it's probably a bug related to  vte and the use of size increments.

If the bug shows in xterm, then it's a bug in xfwm4.
Comment 35 Egmont Koblinger 2019-01-09 20:59:16 CET
Tilix and Konsole don't do any geometry hints, thus should be irrelevant.

VTE doesn't do any geometry hints either anymore, GTK+ removed the possibility of a widget defining resize hints. All that VTE does is that it provides the necessary information (cell size and count) towards the terminal emulator application, which then adds the chrome size and sets up the hints accordingly for the window. So as far as let's say xfce4-terminal and gnome-terminal are concerned, VTE being a common part of them is most likely irrelevant, what could matter is that they both use GTK+ to set up the hints.

Maybe it could provide more information and more basis for bisecting to check the behavior of non-GTK-based apps that do geometry hints, such as xterm, urxvt, terminology, st.
Comment 36 Git Bot editbugs 2019-01-10 09:07:11 CET
Olivier Fourdan referenced this bugreport in commit 3751c2c716714f84dd3d527b60f3543e96fac54e

events: ignore client configure requests when maxized

https://git.xfce.org/xfce/xfwm4/commit?id=3751c2c716714f84dd3d527b60f3543e96fac54e
Comment 37 Igor editbugs 2019-01-13 04:05:08 CET
Thank you, Olivier!
Comment 38 Andre Miranda editbugs 2019-02-24 19:17:25 CET
@Olivier, @Igor it seems the issue has been settled, can we close this bug?
Comment 39 Olivier Fourdan editbugs 2019-02-25 08:29:37 CET
Sure.
Comment 40 Git Bot editbugs 2019-06-24 19:11:35 CEST
Olivier Fourdan referenced this bugreport in commit 34ff3e1fe027b4005c284fcaf5235e6686cf35fc

client: ignore configure requests when maximized

https://git.xfce.org/xfce/xfwm4/commit?id=34ff3e1fe027b4005c284fcaf5235e6686cf35fc

Bug #13954

Reported by:
Marcos Mello
Reported on: 2017-10-26
Last modified on: 2019-06-24

People

Assignee:
Olivier Fourdan
CC List:
7 users

Version

Version:
unspecified

Attachments

Fullscreen problem (107.16 KB, image/png)
2017-10-26 20:19 CEST , Marcos Mello
no flags
GNOME Terminal maximized (94.20 KB, image/png)
2017-10-27 01:31 CEST , Marcos Mello
no flags
Video showing the problem (460.01 KB, video/webm)
2017-10-27 12:04 CEST , Marcos Mello
no flags
Video showing the problem 2 (221.87 KB, video/webm)
2017-12-07 18:46 CET , Marcos Mello
no flags
video showing this bug on b1248a7 (859.92 KB, video/webm)
2018-12-26 07:37 CET , Tomasz Gąsior
no flags
this patch fixes bug, applied to b1248a70 (553 bytes, patch)
2018-12-26 07:38 CET , Tomasz Gąsior
no flags

Additional information