diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/window/window.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/window/window.c b/src/window/window.c index 660ae9d..958adab 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -338,6 +338,7 @@ static int mgl_window_init(mgl_window *self, const char *title, const mgl_window window_attr.colormap = x11_context->color_map; window_attr.background_pixel = 0; window_attr.border_pixel = 0; + window_attr.bit_gravity = NorthWestGravity; window_attr.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | @@ -347,7 +348,7 @@ static int mgl_window_init(mgl_window *self, const char *title, const mgl_window const bool hide_window = params ? params->hidden : false; if(existing_window) { - if(!XChangeWindowAttributes(context->connection, existing_window, CWColormap | CWEventMask | CWOverrideRedirect | CWBorderPixel | CWBackPixel, &window_attr)) { + if(!XChangeWindowAttributes(context->connection, existing_window, CWColormap | CWEventMask | CWOverrideRedirect | CWBorderPixel | CWBackPixel | CWBitGravity, &window_attr)) { fprintf(stderr, "mgl error: XChangeWindowAttributes failed\n"); mgl_window_deinit(self); return -1; @@ -360,7 +361,7 @@ static int mgl_window_init(mgl_window *self, const char *title, const mgl_window self->window = XCreateWindow(context->connection, parent_window, params->position.x, params->position.y, window_size.x, window_size.y, 0, x11_context->visual_info->depth, InputOutput, x11_context->visual_info->visual, - CWColormap | CWEventMask | CWOverrideRedirect | CWBorderPixel | CWBackPixel, &window_attr); + CWColormap | CWEventMask | CWOverrideRedirect | CWBorderPixel | CWBackPixel | CWBitGravity, &window_attr); if(!self->window) { fprintf(stderr, "mgl error: XCreateWindow failed\n"); mgl_window_deinit(self); |