Thoma5 / gnome-shell-extension-bottompanel

Move your GNOME 3.16+ shell panel to the bottom
19 stars 6 forks source link

Invisible edge with multiple monitors not moved to the bottom #9

Closed jhasse closed 4 years ago

jhasse commented 7 years ago

With multiple monitors GNOME Shell adds an invisible edge to the left and right of the panel so that your mouse gets stuck there. Hard to explain, but it's easily noticeable when moving the mouse from the panel to the second monitor.

With BottomPanel this invisible edge is still at the top, although the panel is at the bottom.

Thoma5 commented 7 years ago

I am unable to reproduce this. Have you tried restarting the shell after enabling this extension? (Alt+F2 and enter the letter r in the appearing window)

jhasse commented 6 years ago

Yes, restarting the shell didn't have an effect.

The secondary display is on the left of the primary display btw.

MorrisJohns commented 5 years ago

I also get the "invisible edge" using multiple monitors - especially noticable at top-right where barrier is set up to "help" get to the status menu - but the barrier interferes with getting to a top-left menu on a full screen on monitor to the right (Ubuntu 18.04.01, GNOME Shell 3.28.3).

I did a little investigation, and from what I can see gnome-shell sets up pointer barriers using XFixes (via mutter https://www.paldo.org/index-section-packages-page-main-releaseid-23868.html - I think). Perhaps an example of using the barriers from JavaScript is the function _updateBarrier() in /usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/docking.js and I found this original commit relating to this https://mail.gnome.org/archives/commits-list/2011-March/msg10092.html

FYI I have added some of the code for _updateBarrier() however this code is NOT causing the problem (a two-way barrier to do with autohide - compared with this bug which is a one-way barrier on my system).

   _updateBarrier: function() {
        // Remove existing barrier
        this._removeBarrier();

        // The barrier needs to be removed in fullscreen with autohide disabled, otherwise the mouse can
        // get trapped on monitor.
        if (this._monitor.inFullscreen && !this._settings.get_boolean('autohide-in-fullscreen'))
            return

        // Manually reset pressure barrier
        // This is necessary because we remove the pressure barrier when it is triggered to show the dock
        if (this._pressureBarrier) {
            this._pressureBarrier._reset();
            this._pressureBarrier._isTriggered = false;
        }

       // Create new barrier
        // The barrier extends to the whole workarea, minus 1 px to avoid conflicting with other active corners
        // Note: dash in fixed position doesn't use pressure barrier.
        if (this._canUsePressure && this._autohideIsEnabled && this._settings.get_boolean('require-pressure-to-show')) {
            let x1, x2, y1, y2, direction;
            let workArea = Main.layoutManager.getWorkAreaForMonitor(this._monitor.index)

            if (this._position == St.Side.LEFT) {
                x1 = this._monitor.x + 1;
                x2 = x1;
               y1 = workArea.y + 1;
                y2 = workArea.y + workArea.height - 1;
                direction = Meta.BarrierDirection.POSITIVE_X;
            }

The barrier remains at top-right even when the "top bar" is shifted to the bottom using this extension.

Thoma5 commented 5 years ago

I see the problem. Already found a dirty way to remove the barrier.Next step: Try to move it to the bottom too.

MorrisJohns commented 5 years ago

Great: the only good news I have had at work all week!

Our company (time filer) has a small amount of contract work to updating 10 year old SPA JavaScript code if that interests you...

Either way I will personally donate some $ to a relevent open source project.

Cheers

Thoma5 commented 5 years ago

@MorrisJohns thanks for the offer, but I'm already working in a full time job and also finally started working on my master thesis... barely any freetime atm :(

I've pushed the fix and will test it a few days for any side effecty before uploading a new version on gnome extensions.

MorrisJohns commented 5 years ago

Nahhh, all good. Competent people seem to always be busy -- but it never hurts to check -- ja ja!

I hope the thesis goes well.

M