@@ -195,19 +195,22 @@ public class Gala.DesktopIntegration : GLib.Object {
195195 return ;
196196 }
197197
198- notifying = true ;
199-
200- wm. get_display (). get_sound_player (). play_from_theme (" bell" , _(" Window has already focus" ), null );
198+ unowned var display = wm. get_display ();
201199
202200#if HAS_MUTTER49
203- if (window. is_maximized ()) {
201+ if (window. is_maximized () || ! Meta . Prefs . get_gnome_animations () ) {
204202#else
205- if (window. get_maximized () == BOTH ) {
203+ if (window. get_maximized () == BOTH || ! Meta . Prefs . get_gnome_animations () ) {
206204#endif
207- notifying = false ;
205+ // If user has "Flash screen" enabled, make sure to respect it when shake animation is not played
206+ InternalUtils . bell_notify (display);
208207 return ;
209208 }
210209
210+ display. get_sound_player (). play_from_theme (" bell" , _(" Window has already focus" ), null );
211+
212+ notifying = true ;
213+
211214 var transition = new Clutter .KeyframeTransition (" translation-x" ) {
212215 repeat_count = 5 ,
213216 duration = 100 ,
@@ -217,7 +220,7 @@ public class Gala.DesktopIntegration : GLib.Object {
217220 transition. set_to_value (0 );
218221 transition. set_key_frames ( { 0.5 , - 0.5 } );
219222
220- var offset = Utils . scale_to_int (15 , wm . get_display () . get_monitor_scale (window. get_monitor ()));
223+ var offset = Utils . scale_to_int (15 , display . get_monitor_scale (window. get_monitor ()));
221224 transition. set_values ( { - offset, offset });
222225
223226 transition. stopped. connect (() = > {
@@ -230,9 +233,9 @@ public class Gala.DesktopIntegration : GLib.Object {
230233 });
231234
232235#if HAS_MUTTER48
233- wm . get_display () . get_compositor (). disable_unredirect ();
236+ display . get_compositor (). disable_unredirect ();
234237#else
235- wm . get_display () . disable_unredirect ();
238+ display . disable_unredirect ();
236239#endif
237240
238241 ((Meta . WindowActor ) window. get_compositor_private ()). add_transition (" notify-already-focused" , transition);
0 commit comments