Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Resize on border

Open horriblename opened this issue 2 years ago • 14 comments

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

horriblename avatar Jan 08 '23 17:01 horriblename

if its not ready make it a draft

vaxerski avatar Jan 08 '23 17:01 vaxerski

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

horriblename avatar Jan 13 '23 00:01 horriblename

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.

vaxerski avatar Jan 13 '23 09:01 vaxerski

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

horriblename avatar Jan 13 '23 10:01 horriblename

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.

vaxerski avatar Jan 18 '23 15:01 vaxerski

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?

horriblename avatar Jan 20 '23 15:01 horriblename

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.

vaxerski avatar Jan 20 '23 15:01 vaxerski

hows progress

vaxerski avatar Feb 02 '23 11:02 vaxerski

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:

image

if this works that'll be everything~~

horriblename avatar Feb 02 '23 15:02 horriblename

is there anyway to detect when a window has a right click menu open?

horriblename avatar Feb 02 '23 16:02 horriblename

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?

vaxerski avatar Feb 02 '23 16:02 vaxerski

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

horriblename avatar Feb 03 '23 03:02 horriblename

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?)

horriblename avatar Feb 04 '23 22:02 horriblename

closing / opening popups is down to the application not hyprland

vaxerski avatar Feb 05 '23 14:02 vaxerski

can't review until the conflicts are resolvado. Rebase against head

vaxerski avatar Feb 15 '23 11:02 vaxerski

done

horriblename avatar Feb 15 '23 11:02 horriblename

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?

horriblename avatar Feb 15 '23 11:02 horriblename

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

vaxerski avatar Feb 15 '23 13:02 vaxerski

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 :/

horriblename avatar Feb 16 '23 15:02 horriblename

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?

vaxerski avatar Feb 16 '23 17:02 vaxerski

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

horriblename avatar Feb 17 '23 14:02 horriblename

Ready to merge when checks pass, if you could make a wiki pr with new opts it would be great.

vaxerski avatar Feb 18 '23 15:02 vaxerski

aight wiki pr: https://github.com/hyprwm/hyprland-wiki/pull/130

horriblename avatar Feb 18 '23 21:02 horriblename