cleanup: Use type-safe comparisons
We have been using type-safe comparisons in new code for quite a while now, however old code has only been adapted slowly. Change all the remaining bits to get rid of another legacy style difference. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2866>
This commit is contained in:

committed by
Marge Bot

parent
9a3913d4a0
commit
a42f7c2384
@ -50,7 +50,7 @@ class ShellInfo {
|
||||
}
|
||||
|
||||
let notification = null;
|
||||
if (this._source.notifications.length == 0) {
|
||||
if (this._source.notifications.length === 0) {
|
||||
notification = new MessageTray.Notification(this._source, text, null);
|
||||
notification.setTransient(true);
|
||||
notification.setForFeedback(forFeedback);
|
||||
@ -337,7 +337,7 @@ export class Overview extends Signals.EventEmitter {
|
||||
}
|
||||
|
||||
_resetWindowSwitchTimeout() {
|
||||
if (this._windowSwitchTimeoutId != 0) {
|
||||
if (this._windowSwitchTimeoutId !== 0) {
|
||||
GLib.source_remove(this._windowSwitchTimeoutId);
|
||||
this._windowSwitchTimeoutId = 0;
|
||||
}
|
||||
@ -352,7 +352,7 @@ export class Overview extends Signals.EventEmitter {
|
||||
this._windowSwitchTimestamp = global.get_current_time();
|
||||
|
||||
if (targetIsWindow &&
|
||||
dragEvent.targetActor._delegate.metaWindow == this._lastHoveredWindow)
|
||||
dragEvent.targetActor._delegate.metaWindow === this._lastHoveredWindow)
|
||||
return DND.DragMotionResult.CONTINUE;
|
||||
|
||||
this._lastHoveredWindow = null;
|
||||
@ -605,9 +605,10 @@ export class Overview extends Signals.EventEmitter {
|
||||
let event = Clutter.get_current_event();
|
||||
if (event) {
|
||||
let type = event.type();
|
||||
let button = type == Clutter.EventType.BUTTON_PRESS ||
|
||||
type == Clutter.EventType.BUTTON_RELEASE;
|
||||
let ctrl = (event.get_state() & Clutter.ModifierType.CONTROL_MASK) != 0;
|
||||
const button =
|
||||
type === Clutter.EventType.BUTTON_PRESS ||
|
||||
type === Clutter.EventType.BUTTON_RELEASE;
|
||||
let ctrl = (event.get_state() & Clutter.ModifierType.CONTROL_MASK) !== 0;
|
||||
if (button && ctrl)
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user