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

Set _NET_FRAME_EXTENTS according to the actual decoration size #5944

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions release-notes/changes/5-set-_NET_FRAME_EXTENTS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set _NET_FRAME_EXTENTS according to the actual decoration size
18 changes: 18 additions & 0 deletions src/x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,24 @@ void x_push_node(Con *con) {

set_shape_state(con, need_reshape);

/* Set _NET_FRAME_EXTENTS according to the actual decoration size. */
if (con != NULL && con->window != NULL) {
Rect bsr = con_border_style_rect(con);
Rect r = {
bsr.x, /* left */
0 - bsr.width - bsr.x, /* right */
bsr.y, /* top */
0 - bsr.height - bsr.y /* bottom */
};
xcb_change_property(
conn,
XCB_PROP_MODE_REPLACE,
con->window->id,
A__NET_FRAME_EXTENTS,
XCB_ATOM_CARDINAL, 32, 4,
&r);
}

/* Map if map state changed, also ensure that the child window
* is changed if we are mapped and there is a new, unmapped child window.
* Unmaps are handled in x_push_node_unmaps(). */
Expand Down