Hyprland
Hyprland copied to clipboard
Resize on border
Describe your PR, what does it fix/add?
#1346
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
- The resizing function for tiled windows is kinda wonky for this, if you try to drag the left edge of a window it might resize the right side instead, I might make a separate pr for that
Is it ready for merging, or does it need work?
Yes
if its not ready make it a draft
an option to expand the grab area to eat into the window a bit (especially on floating windows the grab area is unintuitive and annoying
I just hopped on Gnome and it seems that they extend the grab area outwards, it made more sense to me since it won't completely deny certain area from the app so I'll go with that
Also, I just noticed dragging window while fullscreen isn't allowed, why is that? I can't decide if i should disable focusable border + dragging cursor icon in fullscreen
Also, I just noticed dragging window while fullscreen isn't allowed, why is that?
why would it be? a fullscreen window should not be dragged to be resized.
sry, I was talking about pinned windows over fullscreen, I could've sworn they did nothing when I tried to resize them last night. It works now so I guess I'm just seeing things
not sure if you've finished with the code yet, but re-request a review from me when you do.
Two things with the icons:
- moving a mouse over the corner will flash the pointer if you go over the border
- there are only corner icons, while there should be also non-corner ones
an option to disable those cursors would be nice, as well as maybe a way to configure a modifier that enables this functionality? I should add transparent binds, that would do it.
re-request a review from me when you do.
ok got it thx
moving a mouse over the corner will flash the pointer if you go over the border
can you send a screenshot/recording? I'm not sure what u mean
as well as maybe a way to configure a modifier that enables this functionality?
If u meant changing the cursor icon only when a modifier key is held down, I think it's somewhat redundant to what we already have with mouse binds, I mean, y would anyone hold down the key then point at the border if they can just use mouse binds?
If u meant changing the cursor icon only when a modifier key is held down, I think it's somewhat redundant to what we already have with mouse binds, I mean, y would anyone hold down the key then point at the border if they can just use mouse binds?
right, my bad.
can you send a screenshot/recording? I'm not sure what u mean
odd, when trying to record it's not visible on the recording. Maybe it's my laptop or the fact I am using a nest.
hows progress
EDIT: just built from my laptop, fix doesn't work, ignore everything below lol
~~my system ran out of space and now I have a half corrupted system :facepalm:. I can't build anything atm, can you help try out the latest commit and see if it fix this bug:
right click menus that can't be clicked when the cursor is outside the region of the parent window, like this in dolphin:

if this works that'll be everything~~
is there anyway to detect when a window has a right click menu open?
is there anyway to detect when a window has a right click menu open?
count the amount of subsurfaces with a popup role
why tho?
if the mouse is outside of the main window's bounds it's treated as if it's on a border, so subsurfaces (?) that stretch outside the window is treated as border
I decided to check for g_pCompositor->m_vXDGPopups.empty(), and disabling resizing border when there are any popups present; should I also check if the popup is on the same monitor? idk how popups behave in multi-monitor (does clicking close a popup on another monitor?)
closing / opening popups is down to the application not hyprland
can't review until the conflicts are resolvado. Rebase against head
done
also the way I did the cursor icon seemed rly bad, I set the cursor icon every single tick of mouse movement. should maybe change that?
also the way I did the cursor icon seemed rly bad, I set the cursor icon every single tick of mouse movement. should maybe change that?
if that's still your method, yea
I had to rework unsetCursorImage and setCursorImageUntilUnset a little,
the reason being IHyprLayout::onMouseMove calls onEndDragWindow very often which resets all cursor icons so i need something to prevent the that from interfering with border hover icons
I hope I'm not over complicating this :/
the reason being IHyprLayout::onMouseMove calls onEndDragWindow very often which resets all cursor icons
why not fix the source instead of ugly patches to the method? Isn't onEndDragWindow ignored on no drag anyways?
Isn't onEndDragWindow ignored on no drag anyways?
yea you're right, though unsetting the icon comes before checking for valid window. I moved unsetting icon after the check
Ready to merge when checks pass, if you could make a wiki pr with new opts it would be great.
aight wiki pr: https://github.com/hyprwm/hyprland-wiki/pull/130