Don't mix GJS and GObject signal systems
GJS implements a basic signal system that allows monkey-patching JS objects with signal methods resembling the GObject ones. However it's clearly not a good idea to replace the actual GObject methods, so use the proper GObject facilities when inheriting from GObject. https://bugzilla.gnome.org/show_bug.cgi?id=778660
This commit is contained in:
@ -554,6 +554,7 @@ Signals.addSignalMethods(TouchpadWorkspaceSwitchAction.prototype);
|
||||
const WorkspaceSwitchAction = new Lang.Class({
|
||||
Name: 'WorkspaceSwitchAction',
|
||||
Extends: Clutter.SwipeAction,
|
||||
Signals: { 'activated': { param_types: [Meta.MotionDirection.$gtype] } },
|
||||
|
||||
_init : function() {
|
||||
const MOTION_THRESHOLD = 50;
|
||||
@ -591,11 +592,11 @@ const WorkspaceSwitchAction = new Lang.Class({
|
||||
this.emit('activated', dir);
|
||||
}
|
||||
});
|
||||
Signals.addSignalMethods(WorkspaceSwitchAction.prototype);
|
||||
|
||||
const AppSwitchAction = new Lang.Class({
|
||||
Name: 'AppSwitchAction',
|
||||
Extends: Clutter.GestureAction,
|
||||
Signals: { 'activated': {} },
|
||||
|
||||
_init : function() {
|
||||
this.parent();
|
||||
@ -657,7 +658,6 @@ const AppSwitchAction = new Lang.Class({
|
||||
return true;
|
||||
}
|
||||
});
|
||||
Signals.addSignalMethods(AppSwitchAction.prototype);
|
||||
|
||||
const ResizePopup = new Lang.Class({
|
||||
Name: 'ResizePopup',
|
||||
|
Reference in New Issue
Block a user