Bug 433230

Summary: Dolphin window doesn't return to size set by user after returning from maximize state
Product: [Applications] dolphin Reporter: Łukasz Konieczny <ftefrjbhfvasf32>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: cfeck, ftefrjbhfvasf32, kfm-devel, nate
Priority: NOR    
Version: 20.12.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Video showing strange behavior of Dolphin after returning from maximization of window
The second video showing this behavior of Dolphin in version 20.12.3

Description Łukasz Konieczny 2021-02-19 09:16:27 UTC
Created attachment 135893 [details]
Video showing strange behavior of Dolphin after returning from maximization of window

SUMMARY
I have set size of Dolphin window in window rules in order to have Dolphin window of the same size every time I create a window of this program. But when I maximize the window of Dolphin and return from maximization, Dolphin sets window size to its own size and doesn't respect my own settings. Moreover, "places" pane on the left is shrunk. This behavior is shown in attached video made using vokoscreenNG. Other KDE programs behave correctly, only Dolphin behaves this way.

STEPS TO REPRODUCE
1. Set window size of Dolphin in System Settings and set it to be applied when new window is created.
2. Launch Dolphin.
3. Maximize its window.
4. Return from maximization.

OBSERVED RESULT
Dolphin doesn't respect user settings.

EXPECTED RESULT
Dolphin window has the same size as it has before maximization.


SOFTWARE/OS VERSIONS
Operating System: EndeavourOS
KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.10.16-arch1-1
OS Type: 64-bit
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-5200U CPU @ 2.20GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 5500

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-02-19 15:18:45 UTC
You can remove that window rule because Dolphin now always remembers its window size automatically. :)

If you don't want to remove the window rule, you need to make use of the window rule setting to override the app's own window geometry by also adding an "Ignore Requested Geometry: Yes" property to your window rule. This is made clearer in Plasma 5.21 when you create a window rule with with Size: property.
Comment 2 Łukasz Konieczny 2021-02-19 17:11:00 UTC
(In reply to Nate Graham from comment #1)
> You can remove that window rule because Dolphin now always remembers its
> window size automatically. :)

I made this window rule in case I would like to temporarily change Dolphin's window size, because I want Dolphin to have the same size every time I launch it.

> If you don't want to remove the window rule, you need to make use of the
> window rule setting to override the app's own window geometry by also adding
> an "Ignore Requested Geometry: Yes" property to your window rule. This is
> made clearer in Plasma 5.21 when you create a window rule with with Size:
> property.

I checked if it is true, and no. I removed the window rule and yes, Dolphin remembers its size, unless I maximize its window. When I maximize and return from maximization, Dolphin sets window size to this size, which I have shown in video. I have tried everything, also setting "Ignore Requested Geometry: Yes", and it doesn't work. Dolphin is still stubborn and after returning from maximization it sets its size to this fixed value, which I don't want.

I think there is either problem with Dolphin respecting Plasma's settings, or someone hard-coded this unwanted window size into Dolphin. Or some another problem, which I don't know.

And still there is problem with "Places" panel on the left side of the window, which changes width after returning from maximization. I don't want this behavior either.

Older version of Dolphin (20.08) didn't have those problems.

Thank you in advance for your help!
Comment 3 Łukasz Konieczny 2021-02-19 19:15:12 UTC
Perhaps this problem depends on size of window. My size of Dolphin window is 784x616.
Comment 4 Nate Graham 2021-02-19 20:25:36 UTC
Hmm, seems kind of like Bug 432661, but that was fixed in Frameworks 5.79 and yo have that.

If you remove your window rule entirely, does Dolphin restore to the correct position?

If not, does it do so if you temporarily move aside your ~/.config/dolphinrc file, restart Dolphin, and try a maximize+restore cycle again?
Comment 5 Nate Graham 2021-02-19 20:25:48 UTC
.
Comment 6 Łukasz Konieczny 2021-02-19 21:57:09 UTC
(In reply to Nate Graham from comment #4)
> Hmm, seems kind of like Bug 432661, but that was fixed in Frameworks 5.79
> and yo have that.
> 
> If you remove your window rule entirely, does Dolphin restore to the correct
> position?

Position is OK. I have setting to place every window in the center of the screen. But size of the window is incorrect, regardless if I have a window rule or not. So no, if I remove this rule, Dolphin still restores to incorrect size of window. But I have noticed that if size of unmaximized Dolphin window is larger, more or less larger, this problem doesn't occur. But in my case (784x616) it occurs.
 
> If not, does it do so if you temporarily move aside your ~/.config/dolphinrc
> file, restart Dolphin, and try a maximize+restore cycle again?

No, it doesn't help. It only makes Dolphin loss my settings, unless I restore that file into its place.
Comment 7 Nate Graham 2021-02-19 22:39:59 UTC
FWIW if your goal is to always position all windows in the center, there's a much easier solution than using Window Rules:

1. Go to System Settings > Window Management > Window Behavior > Advanced
2. Change "Window Placement" to "Centered"
3. Uncheck "Allow apps to remember the positions of their own windows, if they support it

Voila!
Comment 8 Łukasz Konieczny 2021-02-19 22:44:00 UTC
(In reply to Nate Graham from comment #7)
> FWIW if your goal is to always position all windows in the center, there's a
> much easier solution than using Window Rules:
> 
> 1. Go to System Settings > Window Management > Window Behavior > Advanced
> 2. Change "Window Placement" to "Centered"
> 3. Uncheck "Allow apps to remember the positions of their own windows, if
> they support it
> 
> Voila!

That's what I did. I was talking about that exactly.
I have separate window rules, but only the ones that control size of the windows of particular programs.
Comment 9 Bug Janitor Service 2021-03-06 04:33:27 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Łukasz Konieczny 2021-03-06 19:52:11 UTC
Created attachment 136437 [details]
The second video showing this behavior of Dolphin in version 20.12.3
Comment 11 Łukasz Konieczny 2021-03-06 19:53:15 UTC
Because of the remainder about bug closing due to inactivity, I have posted another video, which shows this problem. Still doesn't work for me.
Comment 12 Łukasz Konieczny 2021-03-06 20:08:04 UTC
Finally, I have found, what is causing problem. In recent version of Dolphin you have moved URL navigator into the toolbar. Please, remove the URL navigator (breadcrumbs) from the toolbar, then it will appear under the toolbar. You will see, that Dolphin doesn't return into the window size set by you, when you return from maximize state.
Comment 13 Nate Graham 2021-03-07 15:36:19 UTC
That's not related to this, but if you're sure it is, you can test again by removing the "Location Bar" item from Dolphin's toolbar.
Comment 14 Łukasz Konieczny 2021-03-07 16:53:47 UTC
(In reply to Nate Graham from comment #13)
> That's not related to this, but if you're sure it is, you can test again by
> removing the "Location Bar" item from Dolphin's toolbar.

I have already tested this on new account in system (in order to eliminate other factors). When location bar is in the toolbar (default since Dolphin 20.12), Dolphin behaves correctly. When location bar is not in the toolbar, but under the toolbar (that's my setting, because I like that), Dolphin doesn't return to the desired size of window.

So it must be caused by placement of location bar. Or by something connected to the placement of this element of interface.
Comment 15 Nate Graham 2021-03-07 21:46:54 UTC
Can't reproduce, FWIW. In both cases, the restored window moves to the correct place. I did find one related problem while testing, however: Bug 434116.

I will try to fix that soon.
Comment 16 Łukasz Konieczny 2021-03-07 21:50:21 UTC
(In reply to Nate Graham from comment #15)
> Can't reproduce, FWIW. In both cases, the restored window moves to the
> correct place. I did find one related problem while testing, however: Bug
> 434116.
> 
> I will try to fix that soon.

Perhaps the initial size of window matters? Please try to shrink your Dolphin window so that you have four columns of files/directories in icon view. I have such setup and in this case I can reproduce the problem every time.
Comment 17 Łukasz Konieczny 2021-03-07 21:54:06 UTC
(In reply to Nate Graham from comment #15)
> Can't reproduce, FWIW. In both cases, the restored window moves to the
> correct place. I did find one related problem while testing, however: Bug
> 434116.
> 
> I will try to fix that soon.

I have to add, that in icon view I have icons of size 80 px.
Comment 18 Nate Graham 2021-03-07 23:53:29 UTC
The size of the window makes no difference for me.