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
@ -41,12 +41,12 @@ export function addBackgroundMenu(actor, layoutManager) {
|
||||
|
||||
let clickAction = new Clutter.ClickAction();
|
||||
clickAction.connect('long-press', (action, theActor, state) => {
|
||||
if (state == Clutter.LongPressState.QUERY) {
|
||||
return (action.get_button() == 0 ||
|
||||
action.get_button() == 1) &&
|
||||
if (state === Clutter.LongPressState.QUERY) {
|
||||
return (action.get_button() === 0 ||
|
||||
action.get_button() === 1) &&
|
||||
!actor._backgroundMenu.isOpen;
|
||||
}
|
||||
if (state == Clutter.LongPressState.ACTIVATE) {
|
||||
if (state === Clutter.LongPressState.ACTIVATE) {
|
||||
let [x, y] = action.get_coords();
|
||||
openMenu(x, y);
|
||||
actor._backgroundManager.ignoreRelease();
|
||||
@ -54,7 +54,7 @@ export function addBackgroundMenu(actor, layoutManager) {
|
||||
return true;
|
||||
});
|
||||
clickAction.connect('clicked', action => {
|
||||
if (action.get_button() == 3) {
|
||||
if (action.get_button() === 3) {
|
||||
let [x, y] = action.get_coords();
|
||||
openMenu(x, y);
|
||||
}
|
||||
|
Reference in New Issue
Block a user