opensnap icon indicating copy to clipboard operation
opensnap copied to clipboard

Apps with header bar

Open ghost opened this issue 11 years ago • 3 comments

Hi, opensnap doesn't work with applications like Evince and others that use CSD (http://blogs.gnome.org/mclasen/2014/01/13/client-side-decorations-continued/), and also with Chromium. Would be great if it's possible to fix this...

ghost avatar Sep 16 '14 17:09 ghost

The easiest way might be to just disable CSD. Opensnap needs to know the size of the titlebar, right now it gets this from the EWMH hint _NET_FRAME_EXTENTS.

With a regular window this looks like this: _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 18, 0 With a CSD window it looks like this: _NET_FRAME_EXTENTS(CARDINAL) = 2, 2, 2, 2

The title bar height with a regular window would be 18px. With CSD the window draws it own title bar as part of the window and I do not see a way to retrieve the height using X/EWMH.

Chromium does have a regular title bar for me, maybe I've configured that a while back? I can't reproduce that.

As for fixing it, do you know a way to retrieve the size of the CSD using X APIs and EWMH?

If not, the only way to fix this is using hacks to disable CSD.

lawl avatar Sep 17 '14 13:09 lawl

FWIW chromium has a setting under "appearance": "Use system title bar and borders"

AlisterH avatar Sep 18 '14 00:09 AlisterH

This looks like a bug in Gtk, here I've reported it: https://bugzilla.gnome.org/show_bug.cgi?id=736822

ghost avatar Sep 18 '14 16:09 ghost