diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-10-16 07:34:47 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-10-16 07:34:47 +0200 |
commit | 1952897a8cb411d9b10d75ac6a8c223924c07e09 (patch) | |
tree | 098414ec3216870a7e4145ba6d4c0c77c9206880 /src/window.c | |
parent | 97f1b1c735775d1e22412bbcf98ef403f9ee2275 (diff) |
Fix resize event sometimes not triggered (set window gravity)
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index 818805d..62f7e88 100644 --- a/src/window.c +++ b/src/window.c @@ -56,8 +56,9 @@ int mgl_window_create_with_params(mgl_window *self, const char *title, int width XSetWindowAttributes window_attr; window_attr.colormap = color_map; window_attr.event_mask = KeyPressMask | StructureNotifyMask; + window_attr.bit_gravity = NorthWestGravity; - self->window = XCreateWindow(context->connection, parent_window, 0, 0, width, height, 0, ((XVisualInfo*)context->visual_info)->depth, InputOutput, ((XVisualInfo*)context->visual_info)->visual, CWColormap | CWEventMask, &window_attr); + self->window = XCreateWindow(context->connection, parent_window, 0, 0, width, height, 0, ((XVisualInfo*)context->visual_info)->depth, InputOutput, ((XVisualInfo*)context->visual_info)->visual, CWColormap | CWEventMask | CWBitGravity, &window_attr); XFreeColormap(context->connection, color_map); if(!self->window) { fprintf(stderr, "XCreateWindow failed\n"); |