Skip to content

Conversation

@leolost2605
Copy link
Member

@leolost2605 leolost2605 commented Mar 4, 2025

Uses the multitasking view widgets for the desktop workspace switch.

We now have the blurred background for the desktop workspace switch as well.

Also windows that are always visible and thus shouldn't be shown in the multitasking view used to simply disappear. Now they are faded out.

This now also the all the improvements from the new gesture infrastructure:

  • Allow switching over multiple workspaces with one gesture (infrastructure in place, only requires new touchpad backend)
  • Allow interrupting a gesture
  • Allow interrupting keyboard shortcut animation
  • Allow to spam keyboard shortcuts (especially switch to next/previous ws) to quickly switch over multiple workspaces
  • Animate over all workspaces that are skipped (e.g. when triggering move to last ws shortcut)

Fixes #1202
Closes #2225

@leolost2605 leolost2605 changed the title Leolost/multitasking view desktop ws switch Multitasking view desktop workspace switch Mar 4, 2025
@leolost2605 leolost2605 marked this pull request as ready for review March 5, 2025 20:12
@leolost2605
Copy link
Member Author

leolost2605 commented Mar 5, 2025

This should be ready for review and testing now :)
Once again there are a bunch of values regarding animation speed, etc. that we can play with

@leolost2605 leolost2605 requested a review from a team March 5, 2025 20:13
Copy link
Member

@lenemter lenemter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good apart from 2 bugs I noticed:

  1. WindowClone's pointer events are broken. When switching workspaces I can see close button and tooltip, but in the multitasking view they're invisible.
pointer-bug.mp4
  1. Not a serious issue but some layer issues with windows 'Always on visible workspace' checked
pointer-bug.mp4

@leolost2605
Copy link
Member Author

I can reproduce neither of these issues :/

Regarding the workspace closed am I doing something wrong?

Kooha-2025-03-08-12-14-59.mp4

And regarding the shortcuts issue: So you spam Super + s and Super + 1 and suddenly the multitasking view wont open/close again and you're stuck?

Is there anything different that might help?

@lenemter
Copy link
Member

lenemter commented Mar 8, 2025

Hm.. I can reproduce the issue in main as well. I'll report the issue separately

@lenemter
Copy link
Member

lenemter commented Mar 8, 2025

@leolost2605 can you resolve the conflicts please :)

@leolost2605
Copy link
Member Author

@lenemter done :)

@lenemter
Copy link
Member

lenemter commented Mar 8, 2025

I get crash when switching workspaces when animations are disabled:

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x000072b53784527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x000072b5378288ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x000072b5389d4f5b in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x000072b538a3da97 in g_assertion_message_expr () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x0000597abfddb76c in gala_workspace_manager_thaw_remove (self=0x597af02a5140) at ../src/WorkspaceManager.vala:254
#8  0x0000597abfe27c96 in gala_multitasking_view_real_end_progress (base=0x597af036a340, action=GALA_GESTURE_ACTION_SWITCH_WORKSPACE) at ../src/Widgets/MultitaskingView/MultitaskingView.vala:325
#9  0x0000597abfdf8c3b in gala_actor_target_end_progress (self=0x597af036a340, action=GALA_GESTURE_ACTION_SWITCH_WORKSPACE) at ../src/Gestures/ActorTarget.vala:67
#10 0x0000597abfdf913d in gala_actor_target_real_propagate (base=0x597af036a340, update_type=GALA_GESTURE_TARGET_UPDATE_TYPE_END, action=GALA_GESTURE_ACTION_SWITCH_WORKSPACE, progress=-1) at ../src/Gestures/ActorTarget.vala:99
#11 0x0000597abfe01bb8 in gala_gesture_target_propagate (self=0x597af036a340, update_type=GALA_GESTURE_TARGET_UPDATE_TYPE_END, action=GALA_GESTURE_ACTION_SWITCH_WORKSPACE, progress=-1) at ../src/Gestures/GestureTarget.vala:22
#12 0x0000597abfdfbb48 in gala_gesture_controller_finished (self=0x597af02cedb0, is_finished=1) at ../src/Gestures/GestureController.vala:252
#13 0x0000597abfdfb8ab in gala_gesture_controller_finish (self=0x597af02cedb0, velocity=0, to=-1) at ../src/Gestures/GestureController.vala:234
#14 0x0000597abfdfae93 in gala_gesture_controller_gesture_detected (self=0x597af02cedb0, backend=0x597af02f60b0, gesture=Python Exception <class 'ValueError'>: Variable 'static_fundamental_type_nodes' not found.
, timestamp=0) at ../src/Gestures/GestureController.vala:134
#15 0x0000597abfdfa630 in _gala_gesture_controller_gesture_detected_gala_gesture_backend_on_gesture_detected (_sender=0x597af02f60b0, gesture=Python Exception <class 'ValueError'>: Variable 'static_fundamental_type_nodes' not found.
, timestamp=0, self=0x597af02cedb0) at /home/leo/Projects/gala/build/GestureController.c:433
#16 0x0000597abfe01f87 in g_cclosure_user_marshal_BOOLEAN__GALA_GESTURE_UINT (closure=0x597af036f1e0, return_value=0x7ffd3aec2660, n_param_values=3, param_values=0x7ffd3aec24e0, invocation_hint=0x7ffd3aec2430, marshal_data=0x0)
    at ../src/Gestures/GestureTracker.vala:19
#17 0x000072b5389672fa in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x000072b53899690c in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x000072b538986ef2 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x000072b538987a98 in g_signal_emit_by_name () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x0000597abfe0a515 in ___lambda10_ (_data59_=0x597af02d5bb0) at ../src/Gestures/ToucheggBackend.vala:200
#22 0x0000597abfe0a59c in ____lambda10__gsource_func (self=0x597af02d5bb0) at /home/leo/Projects/gala/build/ToucheggBackend.c:727
#23 0x000072b538a1248e in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x000072b538a71717 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x000072b538a12f77 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x000072b5380d501a in meta_context_run_main_loop () at /lib/x86_64-linux-gnu/libmutter-14.so.0
#27 0x0000597abfda5fbe in gala_main (args=0x7ffd3aec3078, args_length1=1) at ../src/Main.vala:88
#28 0x0000597abfda61a9 in main (argc=1, argv=0x7ffd3aec3078) at ../src/Main.vala:29

@leolost2605
Copy link
Member Author

The crash should be fixed now :)

Copy link
Member

@lenemter lenemter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a new issue -- zoom animation is broken :/

@leolost2605
Copy link
Member Author

@lenemter ah yeah that was because i upped the speed here for more amplitude for the nudge. I adjusted the values a bit more so it should work now :)

@leolost2605 leolost2605 requested a review from lenemter March 9, 2025 10:53
Copy link
Member

@lenemter lenemter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leolost2605 When I hold Super+Left/Right on desktop or in multitasking view the framerate drops. The same thing happens with Super+Plus/Minus and Super+Scroll with 'Zoom' action :/ I can't reproduce this issue in main

@leolost2605
Copy link
Member Author

leolost2605 commented Mar 9, 2025

@lenemter ok a bug where you could "stack" the overshoot animation should be fixed now can you try again with that? If you still get frame drops can you maybe send a screen record and tell me your specs?
Starting a spring animation is a somewhat expensive operation but since my laptop is low spec I thought we should be fine. But ig we can always just switch to Clutter Animations for these things that can be spammed since we only really need the springanimation for the end of a gesture. The other alternative would be rate limiting but idk about that 🤷

@leolost2605
Copy link
Member Author

Ok nvm starting our spring isn't that expensive lol

Copy link
Member

@lenemter lenemter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better but the small lag is still there when holding down the keys. But I can reproduce the same issue in main, so let's deal with it later.

@lenemter lenemter merged commit 76d2f42 into main Mar 9, 2025
5 checks passed
@lenemter lenemter deleted the leolost/multitasking-view-desktop-ws-switch branch March 9, 2025 15:35
@lenemter
Copy link
Member

lenemter commented Mar 9, 2025

Also, the lag may be caused by #2060 ¯\_(ツ)_/¯

@davidmhewitt
Copy link
Member

Could you fix up POTFILES based on the files that were moved/deleted/renamed?
https://github.com/elementary/gala/actions/runs/13749970720/job/38449678541

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

Successfully merging this pull request may close these issues.

Touchpad desktop switching gesture is sometimes unresponsive

4 participants