qterminal icon indicating copy to clipboard operation
qterminal copied to clipboard

Making width to 100% moves terminal to center of screen with xfwm4

Open amab8901 opened this issue 2 years ago • 11 comments

Expected Behavior

If the terminal is positioned at the top, and I set the width to 100%, then the terminal should remain on the top of the screen.

Current Behavior

If the terminal is positioned at the top, and I set the width to 100%, then the terminal gets moved to center of screen.

Possible Solution
Steps to Reproduce (for bugs)

Here is initial state:

Appearance: image image

Behavior: image

Shortcuts: image image

Dropdown: image

Bookmarks: image

Now, to trigger the bug, do the following: Preferences > Dropdown > [Width = 100%]

Context

It's annoying that I have to choose between having a gap on the sides and a gap on the top. Why can't the terminal just meet the edge both on the top and the sides simultaneously?

System Information
  • QTerminal version: 1.2.0
  • Distribution & Version: Garuda Linux (2.6.12-1)
  • Kernel: 5.15.82-1-lts
  • Qt Version: None
  • Window Manager: kwindowsystem

amab8901 avatar Dec 25 '22 08:12 amab8901

Not reproducible here.

Some relevant info is missing. For example, it's the WM that is responsible for positioning windows. With KWin, I see no problem.

tsujan avatar Dec 25 '22 08:12 tsujan

Not reproducible here.

Some relevant info is missing. For example, it's the WM that is responsible for positioning windows. With KWin, I see no problem.

it becomes 100%, but then if you click outside the terminal and then reopen it, it reopens in the middle instead of reopening at the top. I also added that kwindowsystem is the window manager

amab8901 avatar Dec 25 '22 09:12 amab8901

.... it becomes 100%, but then if you click

It doesn't happen here; everything is normal.

I also added that kwindowsystem is the window manager

kwindowsystem isn't a window manager. Please find the WM you use. Do you use QTerminal under LXQt or under another DE/session?

tsujan avatar Dec 25 '22 09:12 tsujan

`Please find the WM you use.

$ wmctrl -m
Name: Xfwm4
Class: xfwm4
PID: 1316
Window manager's "showing the desktop" mode: N/A

Do you use QTerminal under LXQt or under another DE/session?

$ echo $XDG_CURRENT_DESKTOP
XFCE

amab8901 avatar Dec 25 '22 10:12 amab8901

OK, thanks! You use Xfwm4.

This may be about some (hidden) Xfwm4 setting, or even a bug in it.

@stefonarch, if I correctly remember, you have a session with Xfwm4. Does this happen there?

tsujan avatar Dec 25 '22 10:12 tsujan

I can reproduce the issue with xfwm4 4.18 on Arch. The terminal position passed to setGeometry() is correct [1] (100% width at the top). Needs to investigate why it doesn't work under xfwm4.

[1] https://github.com/lxqt/qterminal/blob/428eda2a4ca6199e08d15556fa9576622cc6c6db/src/mainwindow.cpp#L743

yan12125 avatar Dec 25 '22 11:12 yan12125

Needs to investigate why it doesn't work under xfwm4.

There are tricks for making most X11 WMs behave correctly regarding position requests. I think one of them is used in LXQt runner — I've also used another method in one of my apps — but some WMs may be stubborn.

tsujan avatar Dec 25 '22 11:12 tsujan

Tricks for specific window managers is less than ideal. @amab8901 Could you report the issue to xfwm4 developers instead?

yan12125 avatar Dec 25 '22 15:12 yan12125

Tricks for specific window managers is less than ideal.

I agree.

Changed the title to prevent misunderstanding.

tsujan avatar Dec 25 '22 15:12 tsujan

I can confirm the issue both on arch and debian in VM.

stefonarch avatar Dec 26 '22 07:12 stefonarch

Here is the relevant issue https://gitlab.xfce.org/xfce/xfwm4/-/issues/687. Thanks for reporting!

yan12125 avatar Dec 29 '22 16:12 yan12125