Skip to content
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

About pinch implementation #4

Open
YaQia opened this issue Oct 11, 2023 · 45 comments
Open

About pinch implementation #4

YaQia opened this issue Oct 11, 2023 · 45 comments

Comments

@YaQia
Copy link

YaQia commented Oct 11, 2023

I have tested it. Almost everything is great, but I can not let Show Desktop work. BTW it might be better to add some hint of Close Window, cause that might be an accidental touch.

@YaQia
Copy link
Author

YaQia commented Oct 11, 2023

If I have an input box, Show Desktop will send a d into it.

@YaQia
Copy link
Author

YaQia commented Oct 11, 2023

I got it. It is Super+d, which is not mapped in my distribution by default.

@amarullz
Copy link
Owner

I still find a way to add a hint indicator. Maybe adding red border into active window (close/minimize action).

You should test volume up/down. Try pinch then hold (don't release it directly)

@YaQia
Copy link
Author

YaQia commented Oct 11, 2023

You should test volume up/down. Try pinch then hold (don't release it directly)

I tried it. The feature works properly.

@amarullz
Copy link
Owner

Screencast.from.2023-10-12.09-28-17.webm

Implementing adaptive indicator. minimize, close, show desktop

@amarullz
Copy link
Owner

New Transition Implementation. 🤩🤩

Screencast.from.2023-10-12.11-17-18.webm

@amarullz
Copy link
Owner

Update can be tested at 3-beta1
https://github.com/amarullz/windowgestures/releases/tag/3.0-beta1

@YaQia
Copy link
Author

YaQia commented Oct 12, 2023

I have tested Close Window and Show Desktop, Close Window seems to reserve the red indicator, leaving a transparent red border (BTW I think red color could be brighter, meaning adding Green and Blue values). And I think it might be probably better to use APIs for those pinch actions rather than assuming the keyboard mapping is the same as other people.

@YaQia
Copy link
Author

YaQia commented Oct 12, 2023

2023-10-12.13-40-22.webm

It turned some part of my screen red.

@YaQia
Copy link
Author

YaQia commented Oct 12, 2023

Strange, it start to influence my topbar now. It is letting my topbar to be transparent (I have Blur My Shell).

@amarullz
Copy link
Owner

Strange, it start to influence my topbar now. It is letting my topbar to be transparent (I have Blur My Shell).

Maybe tint color should be implement differently. I don't have that problem btw

@amarullz
Copy link
Owner

I have tested Close Window and Show Desktop, Close Window seems to reserve the red indicator, leaving a transparent red border (BTW I think red color could be brighter, meaning adding Green and Blue values). And I think it might be probably better to use APIs for those pinch actions rather than assuming the keyboard mapping is the same as other people.

Yea, still search api for show desktop. I think I already know api for close window.

I will try all command call with api if I can find it.

@amarullz
Copy link
Owner

amarullz commented Oct 12, 2023

[email protected]

Add forward-back & Fix close tint indicator garbage (red) didn't cleanup.

@YaQia
Copy link
Author

YaQia commented Oct 12, 2023

[email protected]

Add forward-back & Fix close tint indicator garbage (red) didn't cleanup.

I guess the red indicator window size is not set correctly. It seems to cover to the corner of my right bottom pixel of the screen. And the left up pixel is not aligned to the current window properly.

@amarullz
Copy link
Owner

amarullz commented Oct 12, 2023

[email protected]
Add forward-back & Fix close tint indicator garbage (red) didn't cleanup.

I guess the red indicator window size is not set correctly. It seems to cover to the corner of my right bottom pixel of the screen. And the left up pixel is not aligned to the current window properly.

But it's didn't left the garbage indicator anymore right?

note: I also use Blur My Shell

Maybe I just need to drop the color overlay, I cannot find a more reliable window position from window actor object. Or find other solution. I don't want use shader effect.

@YaQia
Copy link
Author

YaQia commented Oct 13, 2023

But it's didn't left the garbage indicator anymore right?

Yes, no garbage anymore.

Maybe I just need to drop the color overlay, I cannot find a more reliable window position from window actor object. Or find other solution. I don't want use shader effect.

I hope you will get the solution.

@amarullz
Copy link
Owner

I used shader in last commit. It work nicely.
Also switch next/prev window

@YaQia
Copy link
Author

YaQia commented Oct 13, 2023

Sounds good to me. Does that mean we can use the shader effect in minimize/maximize window as well?

@amarullz
Copy link
Owner

I just use basic shader for color manipulation, like change red proportion, make it brighter/dimmer, or lower saturation.

I don't think switch window need some change color indicator 😆.

@amarullz
Copy link
Owner

Screencast.from.2023-10-13.21-55-38.webm

can you test it:
[email protected]

Now next TODO (before submit ext):

  • Add swipe down (3 fingers)
  • Add swipe down left/right (3 fingers)
  • Remove unusable/shortcut-based actions
  • Move move-window to left/right workspace into action list
  • Configurable actions for:
    • Swipe down (3f)
    • Swipe down + left (3f)
    • Swipe down + right (3f)
    • Swipe left (4f)
    • Swipe right (4f)

So we will have alot of customizable gestures for different actions

@YaQia
Copy link
Author

YaQia commented Oct 13, 2023

Wow, this is fantastic! I have tested pinch for next/previous window, which works perfectly well. (The only problem for me is that next window can only be effective on top 2 windows, but previous window can be triggered cyclically. Well, switch window with 3 fingers swiping is also a little strange for me. Switch to next window can only be triggered once, but previous window can be cyclically.)
Currently I think there are 2 small bugs to be fixed:

  1. As shown in your video, Close Window has a blurry overview somehow (seems like using bitmap pooling calculation rather than using the same tech for Next Window).
  2. The swipe left/right to move workspace function is not able to be toggle now (tried not handling active window but not works as well).

@amarullz
Copy link
Owner

amarullz commented Oct 13, 2023

Wow, this is fantastic! I have tested pinch for next/previous window, which works perfectly well. (The only problem for me is that next window can only be effective on top 2 windows, but previous window can be triggered cyclically. Well, switch window with 3 fingers swiping is also a little strange for me. Switch to next window can only be triggered once, but previous window can be cyclically.) Currently I think there are 2 small bugs to be fixed:

There is 2 method to get list windows, list-all window & list windows stacking. Alt-Tab is using stacking, and change everytime active window changes. In this next/prev window I use stacking just like Alt-Tab, so when doing next it will change active window from index 0 to 1 but next call the current window is on index 0 and last active is on 1, so it's like switching window 😝, Its different when you do prev window because it will not mess with stacking change.

Try Alt+Tab once and release all keys, then do again Alt+Tab then release again all keys.
Then try with Alt+Shift+Tab 😝

Maybe I will change Next-Window to Switch Window, and Next/Prev Window use non-stack-window list.

  1. As shown in your video, Close Window has a blurry overview somehow (seems like using bitmap pooling calculation rather than using the same tech for Next Window).

Nope, the problem was from Blur my Shell implementation. without this extension it works perfectly. I think blur my shell use widget layer method (just like my previous close tint color method) but placed behind the window. that layer is the one that process the blur, but I think it's not inside window container, when the window opacity changed it don't automatically transparent.

  1. The swipe left/right to move workspace function is not able to be toggle now (tried not handling active window but not works as well).

You mean the default swipe (3 fingers)?. can you list what extensions you use now?

I change show desktop transition like this btw:

Screencast.from.2023-10-13.23-44-02.webm

@YaQia
Copy link
Author

YaQia commented Oct 13, 2023

You mean the default swipe (3 fingers)?. can you list what extensions you use now?

Well, I am only using this plugin and AppIndicator and KStatusNotifierItem Support. I will test more to check out whether it is a misconfiguration.

@YaQia
Copy link
Author

YaQia commented Oct 13, 2023

There is 2 method to get list windows, list-all window & list windows stacking. Alt-Tab is using stacking, and change everytime active window changes. In this next/prev window I use stacking just like Alt-Tab, so when doing next it will change active window from index 0 to 1 but next call the current window is on index 0 and last active is on 1, so it's like switching window 😝, Its different when you do prev window because it will not mess with stacking change.

I see, Alt+Tab swaps the second element and the first element of the stack, Alt+Shift+Tab pops up the first element and pushes it into the last one (this stack seems to be more like a circular queue rather than a stack 😯).

@amarullz
Copy link
Owner

amarullz commented Oct 13, 2023

I see, Alt+Tab swaps the second element and the first element of the stack, Alt+Shift+Tab pops up the first element and pushes it into the last one (this stack seems to be more like a circular queue rather than a stack 😯).

Try this for Next Window switch fix&tweaks:
[email protected]

Basically the workaround is like this:

  • If you trigger and repeat next-window before 1 timeout, it will go to next window just like Alt+Tab multiple times without releasing Alt key.
  • If you trigger next-window wait 1 seconds, then trigger again, it will cycle to recently active window, just like Alt+Tab release Alt and Tab then press Alt+Tab again.

@amarullz
Copy link
Owner

Timeout duration will be configurable.

@amarullz
Copy link
Owner

Try beta3: https://github.com/amarullz/windowgestures/releases/tag/3.0-beta3

All features has been developed

Screenshot from 2023-10-16 18-27-11

@YaQia
Copy link
Author

YaQia commented Oct 16, 2023

I am using it. Send window left/right seems not working properly. When I swipe left with 4 fingers in the far left workspace, Send window left leads me to the second left workspace and switches back to the far left workspace.

Like this:
录屏 2023-10-16 21-55-25.webm

@YaQia
Copy link
Author

YaQia commented Oct 16, 2023

By the way, Close Window is still blurry without Blur my shell, which I'm not using currently. And Send window right will create workspaces for me, which is not expected as I have fixed my workspace number.

@amarullz
Copy link
Owner

By the way, Close Window is still blurry without Blur my shell, which I'm not using currently. And Send window right will create workspaces for me, which is not expected as I have fixed my workspace number.

Oh.. I will check for dynamic workspace. If it not dynamic it will not add any workspace.

For Close Window, I don't know about blur, but yes the quality is of text becoming pixelated (maybe due usage of shader), still trying alternative method.

@YaQia
Copy link
Author

YaQia commented Oct 16, 2023

For Close Window, I don't know about blur, but yes the quality is of text becoming pixelated (maybe due usage of shader), still trying alternative method.

Oh sorry, I might misunderstood you once again. It is becoming pixelated actually.

@YaQia
Copy link
Author

YaQia commented Oct 16, 2023

I saw you are binding swipe up > down(4 fingers) with Minimize window. I think if we use swipe down(4 fingers) to be minimize window will be better? The move window gesture could be a double tap with 3 fingers instead.

@amarullz
Copy link
Owner

I saw you are binding swipe up > down(4 fingers) with Minimize window. I think if we use swipe down(4 fingers) to be minimize window will be better? The move window gesture could be a double tap with 3 fingers instead.

nice ide

@YaQia
Copy link
Author

YaQia commented Oct 16, 2023

It might be confusing about my last comment. I expect 3 fingers swipe down to be minimize window, which is more intuitive. And I am using Switch 3 and 4 fingers, which means I need a config menu for swipe down(4 fingers).

@amarullz
Copy link
Owner

amarullz commented Oct 16, 2023

I know what you mean. swipe up-down is only in 4-fingers (if not swapped), 3finger is down-up, and you also mention move window

@YaQia
Copy link
Author

YaQia commented Oct 16, 2023

BTW, currently some 3 fingers gestures are fixed with 3 fingers (like pinch), maybe a hint for that is more user-friendly.

@amarullz
Copy link
Owner

BTW, currently some 3 fingers gestures are fixed with 3 fingers (like pinch), maybe a hint for that is more user-friendly.

Maybe I need to dynamically change settings title when Swap 3 fingers changed (still lower priority than implement double tap move).

@amarullz
Copy link
Owner

The only possible way is tap (4/3 finger) hold then move, there is no tap events for 3/4 fingers (except maybe capturing system wide touchpad)

@amarullz
Copy link
Owner

amarullz commented Oct 16, 2023

Can you test this version?
[email protected]

Changes:

  • Add tap-hold to move window
  • 3/4 fingers title will follow switch finger settings
  • Fix send window on static workspace

Screenshot from 2023-10-17 00-43-08

@YaQia
Copy link
Author

YaQia commented Oct 17, 2023

Love it! Probably no hint for moving window with 3 fingers tap and hold when the window is maximized would be better, because the maximized window can not be moved anymore.

@amarullz
Copy link
Owner

amarullz commented Oct 17, 2023

Love it! Probably no hint for moving window with 3 fingers tap and hold when the window is maximized would be better, because the maximized window can not be moved anymore.

Fixed:
[email protected]

Also I added window list indicator

Screencast.from.2023-10-18.06-33-50.webm

@YaQia
Copy link
Author

YaQia commented Oct 19, 2023

Currently Enable maximized window snap toggle is not working properly. I have disabled it but I can still do that. And this window list indicator is too small to me (200% scaling).

@amarullz
Copy link
Owner

amarullz commented Oct 25, 2023

hmm. when I try 200% or other scaling, the UI is also scaled, Maybe I set the scale different from yours? I change it in display settings.

I want to reproduce your problem so I can think how to fix it.

And about snap, you mean the snap/maximize preview? (The transition is not as smooth like before -- it's hide the preview first before showing the next preview), if you mean about it I know how to fix it and already have a plan to fix it.

But I am still on vacation 🤩🏖️

@amarullz
Copy link
Owner

amarullz commented Oct 31, 2023

Fix Enable maximized window snap glitch 2473192

[email protected]

@YaQia
Copy link
Author

YaQia commented Nov 6, 2023

For me the UI is way too small, if I use 300%, it will get as small as a pixel.
录屏 2023-11-06 09-51-22.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants