Skip to content

Instantly share code, notes, and snippets.

@unlocomqx
Created June 5, 2019 00:36
Show Gist options
  • Save unlocomqx/d6e5be86ecaec0c6822bde92659b89d0 to your computer and use it in GitHub Desktop.
Save unlocomqx/d6e5be86ecaec0c6822bde92659b89d0 to your computer and use it in GitHub Desktop.
_mapWindow : function(cinnamonwm, actor) {
actor._windowType = actor.meta_window.get_window_type();
actor._notifyWindowTypeSignalId = actor.meta_window.connect('notify::window-type', Lang.bind(this, function () {
let type = actor.meta_window.get_window_type();
actor._windowType = type;
}));
if (actor.meta_window.is_attached_dialog()) {
this._checkDimming(actor.get_meta_window().get_transient_for());
}
if (actor.get_meta_window()._cinnamonwm_has_origin && actor.get_meta_window()._cinnamonwm_has_origin === true) {
Main.soundManager.play('minimize');
try {
this._startWindowEffect(cinnamonwm, "unminimize", actor, null, "minimize")
return;
} catch(e) {
//catch "no origin found"
}
} else if (actor.meta_window.get_window_type() == Meta.WindowType.NORMAL) {
// Start custom code
if (actor.meta_window.get_title() === 'Untitled - Google Chrome') {
global.log("found cypress chrome, minimizing");
this._minimizeWindow(cinnamonwm, actor);
}
Main.soundManager.play('map');
}
this._startWindowEffect(cinnamonwm, "map", actor);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment