Skip to content

Frameless windows #169

Description

@Fizzadar

I'm trying to implement a frameless window (on MacOS w/pyobjc but ideally this would be possible everywhere, I think electron does it everywhere).

Getting the titlebar transparent and the content to fill the whole window is pretty simple with:

window_mask = window_mask | AppKit.NSFullSizeContentViewWindowMask
...
self.window.setTitlebarAppearsTransparent_(True)
self.window.setTitleVisibility_(AppKit.NSWindowTitleHidden)

However, the frameless window cannot be dragged about because even the very top is covered by the WebView - as dragging the mouse moves this into text selection mode. Electron's solution is a Chrome-specific (annoying) -webkit-app-regon: drag CSS selector.

My thinking is it might be possible to achieve this by drawing a transparent box over the top X pixels of the NSWindow and making that draggable (using setMovableByWindowBackground_(True)).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions