[gnome-shell/gbsneto/appdisplay-vfunc-chain: 2/2] appDisplay: Return the parent class' result in overrides



commit 8f5719a87578ba228d9671fed19f1aafa56b6fb8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Apr 23 19:04:27 2020 -0300

    appDisplay: Return the parent class' result in overrides
    
    StButton returns CLUTTER_EVENT_STOP in various circumstances, but
    AppIcon throws that away and returns CLUTTER_EVENT_PROPAGATE even
    when it should stop.
    
    Return the parent class' result instead of CLUTTER_EVENT_PROPAGATE.

 js/ui/appDisplay.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 2d58541f32..8139fe9494 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -2213,22 +2213,22 @@ var AppIcon = GObject.registerClass({
     }
 
     vfunc_button_press_event(buttonEvent) {
-        super.vfunc_button_press_event(buttonEvent);
+        const ret = super.vfunc_button_press_event(buttonEvent);
         if (buttonEvent.button == 1) {
             this._setPopupTimeout();
         } else if (buttonEvent.button == 3) {
             this.popupMenu();
             return Clutter.EVENT_STOP;
         }
-        return Clutter.EVENT_PROPAGATE;
+        return ret;
     }
 
     vfunc_touch_event(touchEvent) {
-        super.vfunc_touch_event(touchEvent);
+        const ret = super.vfunc_touch_event(touchEvent);
         if (touchEvent.type == Clutter.EventType.TOUCH_BEGIN)
             this._setPopupTimeout();
 
-        return Clutter.EVENT_PROPAGATE;
+        return ret;
     }
 
     vfunc_clicked(button) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]