Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

"Remember the size of the last closed window" in `pcmanfm-qt` not working

Open Kagukara opened this issue 11 months ago • 41 comments

Hyprland Version

System/Version info
Hyprland, built from branch main at commit 29cdd7de1f8d99462915540569fbe54f10f609f4 dirty (layers: minor fixes for new animations).
Date: Wed Feb 28 15:59:45 2024
Tag: v0.36.0-4-g29cdd7de

flags: (if any)


System Information:
System name: Linux
Node name: destrarch
Release: 6.7.6-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Fri, 23 Feb 2024 16:31:48 +0000


GPU information: 
0c:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] [1002:744c] (rev c8) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

Bug or Regression?

Bug

Description

Hyprland isn't allowing pcmanfm-qt to "Remember the size of the last closed window", this was working before but now doesn't.

How to reproduce

  1. Open pcmanfm-qt
  2. Click: Edit →Preferences → User Interface
  3. Turn on "Remember the size of the last closed window"
  4. Close "Preferences", resize pcmanfm-qt and close
  5. Open pcmanfm-qt
  6. Didn't remember window size

Crash reports, logs, images, videos

If any logs are needed please let me know how I get them.

Kagukara avatar Feb 28 '24 17:02 Kagukara

I assume you're launching it as floating...?

vaxerski avatar Feb 28 '24 17:02 vaxerski

I assume you're launching it as floating...?

Correct

Kagukara avatar Feb 28 '24 19:02 Kagukara

fair enough

vaxerski avatar Feb 28 '24 19:02 vaxerski

patch.txt try this

vaxerski avatar Feb 28 '24 19:02 vaxerski

How would I apply this, I use paru to get the latest commit? Would it just be a rebuild?

Kagukara avatar Feb 28 '24 19:02 Kagukara

patch -p1 < /path/to/patch before build

vaxerski avatar Feb 28 '24 19:02 vaxerski

I just did a rebuild of hyprland to make sure I'm on the latest commit, doing the command you provided gives me:

$ patch -p1 < ~/downloads/patch.txt 
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
|index d6241fa4..e13e3398 100644
|--- a/src/events/Windows.cpp
|+++ b/src/events/Windows.cpp
--------------------------
File to patch: 

Kagukara avatar Feb 28 '24 19:02 Kagukara

likely it needs to be in the package source root somewhere.

edit: wait no sec

vaxerski avatar Feb 28 '24 19:02 vaxerski

you need to be in the hyprland source root, thats prolly the issue

vaxerski avatar Feb 28 '24 19:02 vaxerski

Where would the hyprland source root be? Not the clone of Hyprland?

Kagukara avatar Feb 28 '24 20:02 Kagukara

ye patch helped with foot but u forgot to rename caps var in last call patch1.txt

bvr-yr avatar Feb 28 '24 20:02 bvr-yr

Found where the patch needs to be added ~/.cache/paru/clone/hyprland-git/, but not sure how to get it to patch when using paru. I've tried adding it to the PKGBUILD but no luck there unless I'm adding it in in the wrong place?

EDIT: I either get what I got above or:

patching file src/events/Windows.cpp
Hunk #1 FAILED at 806.
1 out of 1 hunk FAILED -- saving rejects to file src/events/Windows.cpp.rej

Kagukara avatar Feb 28 '24 20:02 Kagukara

add it in PKGBUILD in prepare() function somewhere after cd Hyprland with absolute path to patch

bvr-yr avatar Feb 28 '24 20:02 bvr-yr

I either get what I got above or:

did u try

patch1.txt

?

bvr-yr avatar Feb 28 '24 21:02 bvr-yr

Yea, I've been trying with patch1.txt and absolute path, here is the PKGBUILD I'm using from the aur. I've tried patch -p1 < /home/richard/.cache/paru/clone/hyprland-git/patch1.txt on basically every line of prepare() { and its still not working.

Kagukara avatar Feb 28 '24 21:02 Kagukara

patch2.txt

bvr-yr avatar Feb 28 '24 21:02 bvr-yr

I've found the right way to edit the PKGBUILD with paru by doing:

paru --fm pcmanfm-qt --rebuild -S hyprland-git

But same result., its not adding the patch.

Kagukara avatar Feb 28 '24 21:02 Kagukara

Okay, the patch went through:

System/Version info
Hyprland, built from branch main at commit 097f561e41e5660333492c1f188199e837742efe dirty (surfacetree: Revert subsurfaceTree: assign surfaces to a CWLSurface).
Date: Wed Feb 28 19:42:04 2024
Tag: v0.36.0-7-g097f561e

flags: (if any)


System Information:
System name: Linux
Node name: destrarch
Release: 6.7.6-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Fri, 23 Feb 2024 16:31:48 +0000


GPU information: 
0c:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] [1002:744c] (rev c8) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

But whats happened now is that pcmanfm-qt has remembered its window size from before the patch, if I'm remembering properly, and that window size is now the default no matter what size the window is close at.

EDIT: going from non-patched to patched and vice versa does this.

  • Resize pcmanfm-qt
  • Rebuild with patch
  • Restart hyprland
  • Open pcmanfm-qt

Its now the size it was before the patch. Doing this from patched to patched doesn't work.

Kagukara avatar Feb 28 '24 21:02 Kagukara

:D anyways even if it fixes floating size for foot, bugs from #4022 are back even for tiled windows and btw, @vaxerski, when force_introspection = 1 no more weird rectangles in any case, maybe that will help

bvr-yr avatar Feb 28 '24 21:02 bvr-yr

OHHHH, on the none patched version, if a window is already open pcmanfm-qt opens floating as if its splitting the tiled window in half and if no window is open its open to the size of the monitor.

EDIT: Which is also now happening on the patched version. This https://github.com/hyprwm/Hyprland/issues/4871#issuecomment-1969944162 can be ignored.

Kagukara avatar Feb 28 '24 21:02 Kagukara

patch.txt try

vaxerski avatar Feb 28 '24 22:02 vaxerski

I get:

patching file src/events/Windows.cpp
patching file src/managers/XWaylandManager.cpp
patching file src/managers/XWaylandManager.hpp
File subprojects/wlroots is not a regular file -- refusing to patch
1 out of 1 hunk ignored -- saving rejects to file subprojects/wlroots.rej

Kagukara avatar Feb 28 '24 22:02 Kagukara

it worked, ignore wlroots

vaxerski avatar Feb 28 '24 22:02 vaxerski

I have no idea how to do that, this https://github.com/hyprwm/Hyprland/issues/4871#issuecomment-1969929381 is the only patch that has built so far.

Kagukara avatar Feb 28 '24 22:02 Kagukara

the command didn't fail. It succeeded. I said ignore the fact one part refused to patch.

vaxerski avatar Feb 28 '24 22:02 vaxerski

I said ignore the fact one part refused to patch.

So just do nothing and wait or...? Are you saying to make it ignore wlroots, which is the part I said "I have no idea how to do that" for?

Kagukara avatar Feb 28 '24 22:02 Kagukara

do nothing. The command succeeded.

vaxerski avatar Feb 28 '24 22:02 vaxerski

Just if you didn't know it fails to build when I get the above:

==> ERROR: A failure occurred in prepare().
    Aborting...
error: failed to build 'hyprland-git-0.35.0.r104.bc3f5b94-1': 
error: packages failed to build: hyprland-git-0.35.0.r104.bc3f5b94-1

But I will do nothing as the command succeeded.

Kagukara avatar Feb 28 '24 22:02 Kagukara

just add || echo "" I guess so that makepkg can stop being a bitch. Forgot you're using it.

vaxerski avatar Feb 28 '24 22:02 vaxerski

The patch didn't fix pcmanfm-qt.

Kagukara avatar Feb 28 '24 22:02 Kagukara