Skip to content

Commit e2157df

Browse files
committed
windowManager.js: get rid of (non-cinnamon) popup menu animations.
Many apps handle their own popup rendering, so any effects we do here wouldn't apply. For example chromium/chrome and anything chromium-based (electron apps, etc...). The specific effect is different from Cinnamon popups, which are generally anchored to a panel, and unfortunately we can't distinguish Gtk dropdown menus from 'popup' ones (they report to muffin as the same type of window), so there's no way to give them more appropriate animations individually.
1 parent 7186686 commit e2157df

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

js/ui/windowManager.js

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ var WindowManager = class WindowManager {
411411
case Meta.WindowType.MENU:
412412
case Meta.WindowType.DROPDOWN_MENU:
413413
case Meta.WindowType.POPUP_MENU:
414-
return this.desktop_effects_menus;
415414
default:
416415
return false;
417416
}
@@ -855,16 +854,9 @@ var WindowManager = class WindowManager {
855854
return;
856855
}
857856

858-
// menu effects are always fade-in/out
859-
let overridden_types = [Meta.WindowType.MENU,
860-
Meta.WindowType.DROPDOWN_MENU,
861-
Meta.WindowType.POPUP_MENU ];
862-
863857
this._mapping.add(actor);
864858

865-
let adjusted_type = overridden_types.includes(actor._windowType) ? "traditional" : this.desktop_effects_map_type;
866-
867-
switch (adjusted_type) {
859+
switch (this.desktop_effects_map_type) {
868860
case "traditional":
869861
{
870862
actor.orig_opacity = actor.opacity;
@@ -876,11 +868,6 @@ var WindowManager = class WindowManager {
876868

877869
let time = this.MAP_ANIMATION_TIME * this.window_effect_multiplier;
878870

879-
// Popups shouldn't be affected by the multiplier.
880-
if (overridden_types.includes(actor._windowType)) {
881-
time = this.MENU_ANIMATION_TIME;
882-
}
883-
884871
actor.ease({
885872
opacity: actor.orig_opacity,
886873
scale_x: 1,
@@ -991,14 +978,7 @@ var WindowManager = class WindowManager {
991978

992979
this._destroying.add(actor);
993980

994-
// menu effects are always traditional
995-
let overridden_types = [Meta.WindowType.MENU,
996-
Meta.WindowType.DROPDOWN_MENU,
997-
Meta.WindowType.POPUP_MENU ];
998-
999-
let adjusted_type = overridden_types.includes(actor._windowType) ? "traditional" : this.desktop_effects_close_type;
1000-
1001-
switch (adjusted_type) {
981+
switch (this.desktop_effects_close_type) {
1002982
case "fly":
1003983
{
1004984
let [xSrc, ySrc] = actor.get_position();
@@ -1047,10 +1027,6 @@ var WindowManager = class WindowManager {
10471027

10481028
return;
10491029
}
1050-
case Meta.WindowType.MENU:
1051-
case Meta.WindowType.DROPDOWN_MENU:
1052-
case Meta.WindowType.POPUP_MENU:
1053-
// ??
10541030
default:
10551031
{
10561032
this._destroyWindowDone(cinnamonwm, actor);

0 commit comments

Comments
 (0)