Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Linux window control overlays do not allow window resize on the corners #43714

Closed
3 tasks done
bpasero opened this issue Sep 13, 2024 · 2 comments · Fixed by #43724
Closed
3 tasks done

[Bug]: Linux window control overlays do not allow window resize on the corners #43714

bpasero opened this issue Sep 13, 2024 · 2 comments · Fixed by #43724
Assignees
Labels
32-x-y 33-x-y bug 🪲 component/wco platform/linux status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@bpasero
Copy link
Contributor

bpasero commented Sep 13, 2024

Preflight Checklist

Electron Version

32.x

What operating system(s) are you using?

Ubuntu

Operating System Version

22.04

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Expected Behavior

You can resize the window in the top-right corner around the window controls:

Image

Actual Behavior

You cannot resize.

Testcase Gist URL

No response

Additional Information

Simple gist:

// Modules to control application life and create native browser window
const { app, BrowserWindow } = require('electron')
const path = require('node:path')

function createWindow () {
  // Create the browser window.
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      preload: path.join(__dirname, 'preload.js'),
    },
    frame: false,
    titleBarStyle: "hidden",
    titleBarOverlay: {
      height: 29
    }
  });

  // and load the index.html of the app.
  mainWindow.loadFile('index.html')

  // Open the DevTools.
  // mainWindow.webContents.openDevTools()
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.whenReady().then(() => {
  createWindow()

  app.on('activate', function () {
    // On macOS it's common to re-create a window in the app when the
    // dock icon is clicked and there are no other windows open.
    if (BrowserWindow.getAllWindows().length === 0) createWindow()
  })
})

// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on('window-all-closed', function () {
  if (process.platform !== 'darwin') app.quit()
})

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

//cc @codebytere

Reported as microsoft/vscode#228505

@quexten
Copy link

quexten commented Sep 13, 2024

Not sure if it's the same bug, but on Gnome on Wayland, in at least Fedora 40 and Ubuntu 22.04, with --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto, on default titlebarstyle and frame: true, the window becomes entirely un-resizeable (no matter from which side / corner) after upgrading to 32.1.0. This is not present when downgrading to 31.4.0.

With the titlebarstyle from the comment (frame: false) in this issue, on 32.1.0, I see the same behavior as described in the comment (i.e sides are re-sizeable but corner is not).

@codebytere codebytere added the status/confirmed A maintainer reproduced the bug or agreed with the feature label Sep 14, 2024
codebytere added a commit that referenced this issue Sep 16, 2024
Closes #43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.
codebytere added a commit that referenced this issue Sep 17, 2024
Closes #43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.
trop bot added a commit that referenced this issue Sep 17, 2024
Closes #43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.

Co-authored-by: Shelley Vohr <[email protected]>
trop bot added a commit that referenced this issue Sep 17, 2024
Closes #43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.

Co-authored-by: Shelley Vohr <[email protected]>
trop bot added a commit that referenced this issue Sep 17, 2024
Closes #43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.

Co-authored-by: Shelley Vohr <[email protected]>
codebytere added a commit that referenced this issue Sep 17, 2024
Closes #43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
jkleinsc pushed a commit that referenced this issue Sep 17, 2024
Closes #43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
codebytere added a commit that referenced this issue Sep 17, 2024
Closes #43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
@dtcooper
Copy link

Not sure if it's the same bug, but on Gnome on Wayland, in at least Fedora 40 and Ubuntu 22.04, with --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto, on default titlebarstyle and frame: true, the window becomes entirely un-resizeable (no matter from which side / corner) after upgrading to 32.1.0. This is not present when downgrading to 31.4.0.

With the titlebarstyle from the comment (frame: false) in this issue, on 32.1.0, I see the same behavior as described in the comment (i.e sides are re-sizeable but corner is not).

Observing this as well, even after the fix @quexten. Tested on GNOME 46 and 47. Should we create a new issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
32-x-y 33-x-y bug 🪲 component/wco platform/linux status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
Status: 🛠️ Fixed for Next Release
Status: 🛠️ Fixed for Next Release
Development

Successfully merging a pull request may close this issue.

4 participants