lexicalunit / no-title-bar

Hides the Atom title bar on systems that support it.
MIT License
27 stars 2 forks source link

Split pane resizing moving Atom window #35

Open AlecRust opened 6 years ago

AlecRust commented 6 years ago

Seems some parts of Atom's split pane bar are being treated as a window move handle:

screenshot

lexicalunit commented 6 years ago

Interesting, this seems to be partly affected by UI Theme. I can't recreate the issue with native-ui, but I can with atom-dark.

lexicalunit commented 6 years ago

Hrm, it also seems to be the case that my LESS code I wrote to specifically handle this case is not being fully honored.

The element in question is an atom-pane-resize-handle.vertical:before which has the attribute -webkit-app-region: no-drag. However somehow when that element overlays on top of an element that does have drag enabled, we get this issue.

So if you click just above the resize handle, which is overlaid on top of the text editor area, the resize works. But if you click just below the resize handle, to the right of the last tab, that area is overlaid on top of a tab bar. And tab bar elements have window drag enabled.

🤔

lexicalunit commented 6 years ago

@AlecRust for now you can disable dragging on split pane tab bars using this in your Atom Stylesheet:

atom-pane-resize-handle + atom-pane {
  .tab-bar {
    -webkit-app-region: no-drag !important;
  }
}

That completely disables window dragging for any tab-bar element next to a resize handle. That's less than ideal. I'd much rather be able to support window dragging and have the resize handle work as intended but there seems to be some kind of bug preventing that from working correctly. Maybe something to do with Electron? Not sure :(