-
-
Notifications
You must be signed in to change notification settings - Fork 720
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
Fix float windows #3942
base: main
Are you sure you want to change the base?
Fix float windows #3942
Conversation
18ac443
to
a4a62e5
Compare
@vaxerski I solved the problem with xwayland windows. I replaced vec() with goalv() in logic other than animation, it seemed to me more correct because goalv() is used in many places. Not sure if this is correct. There is also a bug that the xwayland window changes size and does not center the window, but as soon as you move the mouse, the window moves to the center and my code centers the window. I have not yet figured out where the window resize event occurs, this bug is not critical, but it will need to be fixed in the future. Tested only with wlroots 0.18.0 and revert patch 2e8446c |
configureX11 and unmanagedSetGeometry |
tag me when ready to review |
a4a62e5
to
70280f8
Compare
@vaxerski done. The problem turned out to be more widespread, i.e. there were several different bugs and the solution took longer. There is only one float window left, which is not positioned in the center, and the reason seems to be specific: |
70280f8
to
895768f
Compare
895768f
to
2922a16
Compare
At the moment I decided to rework the float code and add more flexible cropping tile to float window. |
2922a16
to
1ca3c14
Compare
@vaxerski I reworked the code and improved the floating windows. But I encountered a bug that the config manager does not always change the value, only after a restart. |
what value |
IHyprLayout::changeWindowFloatingMode(CWindow* pWindow)
static auto* const FLOATCENTERSCREEN = &g_pConfigManager->getConfigValuePtr("general:float_center_screen")->intValue;
static auto* const FLOATMINCROP = &g_pConfigManager->getConfigValuePtr("general:float_min_crop")->vecValue; |
fwiw both options will not pass review, extremely bad ideas |
7441f0f
to
b8367d4
Compare
@vaxerski This is the last version of the changes, there will be no more changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also no need to ping me all the time, I get notifications regardless
- Add parameter general:float_min_crop for support minimal size window cropping for windows that cannot transition to float. - Add parameter general:float_center_screen to control spawn new float windows. 1 - New float windows spawn in center screen. 0 - Сonsider the trimming at the top and bottom to calculate the center of the screen. For example, consider the size of the waybar. - Fix float windows - Fix togglefloat - Fix windows that start float and then go into a normal window, aka program launchers. Example: Blizzard battle.net client. The bug render full-screen programs partially behind the screen. Now the xwayland games launch normally. - Code cleanup and refactoring. - Replaced vec() with goalv() in logic other than animation, it seemed to me more correct because goalv() is used in many places. Not sure if this is correct.
bb93090
to
3a189c2
Compare
7110a04
to
25aec3a
Compare
fb471b8
to
1237732
Compare
358e59e
to
3fd6c1b
Compare
Changelog:
for windows that cannot transition to float. If 0 < value < 1.0 then use part of windows size, else pixel size. Example:
0.1 0.2
,400 300
1 - New float windows spawn in center screen.
0 - Сonsider the trimming at the top and bottom to calculate the center of the screen.
For example, consider the size of the waybar.
for example, if there are two windows on the desktop, then the float window is
positioned in the center of half the screen.
program launchers. Example: Blizzard battle.net client.
The bug render full-screen programs partially behind the screen.
Now the xwayland games launch normally.
it seemed to me more correct because goalv() is used in many places.
Not sure if this is correct.
Related bug reports: #3029
Tested programs: Blender, Jetbrains IDEs, Blizzard battle.net client, qt float program.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
No
Is it ready for merging, or does it need work?
Yes.
Fix this: