gs-extensions-drop-down-terminal icon indicating copy to clipboard operation
gs-extensions-drop-down-terminal copied to clipboard

space before terminal on HiDPI

Open Kolcha opened this issue 9 years ago • 17 comments

I recently updated this extension from extensions.gnome.org. the issue with strange position now is fixed, but old issue with HiDPI display (https://github.com/zzrough/gs-extensions-drop-down-terminal/issues/84 https://github.com/zzrough/gs-extensions-drop-down-terminal/issues/87) is back: screenshot from 2015-11-18 00-15-44 Hardware: MacBook Pro with Retina display OS: Fedora 23 GNOME Shell: 3.18.1 extension version: 19 (got from metadata.json)

Kolcha avatar Nov 17 '15 21:11 Kolcha

I have this same issue. Hardware: Dell XPS 13 DE (3200x1800) OS: Fedora 23 GNOME Shell: 3.18.3 Extension version is newest I guess..

sphinx9 avatar Dec 03 '15 01:12 sphinx9

I have this same issue too. Hardware: Chromebook pixel 2013 OS: Ubuntu 14.04 GNOME Shell: 3.18.3 Extension version: install from https://extensions.gnome.org/ today

chenxilong avatar Dec 05 '15 15:12 chenxilong

Same hardware of @sphinx9, gnome shell 3.18.3: same gap!

Using Wayland the gap is not present; same OS (Arch Linux), same Gnome Shell installation.

mario-tux avatar Jan 23 '16 16:01 mario-tux

Hi, I came here too see if I were alone or if there were more people with the same problem. I am having the same issue. Hardware: Retina MacBook Pro 13" 2015 OS: Ubuntu 15.10 GNOME Shell: 3.18.2 extension version: 19

muhsli avatar Feb 11 '16 16:02 muhsli

I'm having the same issue.

Hardware: Dell XPS 13 DE (3200x1800) OS: Ubuntu Gnome 15.10

emilhem avatar Mar 01 '16 10:03 emilhem

I was having the same issue Ubuntu Gnome ThinkPad P50, 4K screen

After going through reported issues, found that this was fixed on earlier versions. It appears that this was missed on newer ones.

// applies the change dynamically if the terminal is already spawn
        if (this._busProxy !== null && this._windowHeight !== null) {
            ///this._busProxy.SetGeometryRemote(this._windowX, this._windowY, this._windowWidth, this._windowHeight);
            if (SHELL_VERSION < 3.14) {
                this._busProxy.SetGeometryRemote(this._windowX, this._windowY, this._windowWidth, this._windowHeight);
            } else {
                this._busProxy.SetGeometryRemote(this._windowX, this._windowY - panelBox.height, this._windowWidth, this._windowHeight);
            }
        }

Removed my first comment.

fmujakitz avatar Mar 12 '16 12:03 fmujakitz

thanks a lot, fixed extension using code from @fmujakitz second post

comment line as in first post has no effect for me using both change broke extension

Kolcha avatar Mar 13 '16 07:03 Kolcha

Can confirm, it fixes my error as well. Thank you @fmujakitz

muhsli avatar Mar 13 '16 17:03 muhsli

Thanks for this!

I can confirm that the fix works with the v19 code. However, it doesn't work on v20 for me.

jonkri avatar Mar 25 '16 16:03 jonkri

Same issue on hidpi / Archlinux.

ouafnico avatar Mar 28 '16 21:03 ouafnico

I ran in the same issue.

It appears to be caused by a missing scaleFactor in extension.js, l.518, that causes HiDPI to display space between the top bar and the terminal

case TOP_EDGE:
    this._windowX = x1;
->  this._windowY = panelBox.y == y1 ? y1 + panelBox.height/scaleFactor: y1;
    this._windowWidth = screenWidth;
    this._windowHeight = this._evaluateSizeSpec(sizeSpec, true);
    break;

tomMoral avatar Mar 30 '16 17:03 tomMoral

@fmujakitz's fix worked for me. Thanks.

shihrer avatar Apr 04 '16 09:04 shihrer

@shihrer: On which version?

jonkri avatar Apr 06 '16 09:04 jonkri

@jonkri Of the extension? Not sure, whatever is available on extensions.gnome.org.

shihrer avatar Apr 06 '16 16:04 shihrer

@shihrer: Looking at extensions.gnome.org, that seems to be version 20. This is a bit odd, since applying @fmujakitz's fix on version 20 didn't work for me (as reported in my comment above) - I had to use version 19. Maybe I did something wrong...

jonkri avatar Apr 07 '16 08:04 jonkri

@shihrer: Would it be possible for you to verify that you indeed run version 20 (you can see this in the JSON file)? If you do, perhaps you could diff your extension.js with the one from version 20 to make sure that all you changed is @fmujakitz's comment.

jonkri avatar Apr 07 '16 08:04 jonkri

@fmujakitz's fix basically works, except that the scale factor needs to be taken into account (especially in HiDPI displays):

// applies the change dynamically if the terminal is already spawn
        if (this._busProxy !== null && this._windowHeight !== null) {
            ///this._busProxy.SetGeometryRemote(this._windowX, this._windowY, this._windowWidth, this._windowHeight);
            if (SHELL_VERSION < 3.14) {
                this._busProxy.SetGeometryRemote(this._windowX, this._windowY, this._windowWidth, this._windowHeight);
            } else {
                this._busProxy.SetGeometryRemote(this._windowX, this._windowY - panelBox.height/scaleFactor, this._windowWidth, this._windowHeight);
            }
        }

AthanasiusOfAlex avatar May 07 '16 08:05 AthanasiusOfAlex