mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-02-05 04:10:34 +01:00
xdg-client-helper: Use a default WINDOW size value
If the shell doesn't provide a configure size, use a default one. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
7bb9fc5b62
commit
35da5ca5a6
2 changed files with 12 additions and 2 deletions
|
|
@ -167,8 +167,17 @@ xdg_surface_commit_solid(struct xdg_surface_data *xdg_surface,
|
|||
{
|
||||
pixman_color_t color;
|
||||
struct buffer *buf;
|
||||
int width = xdg_surface->configure.width;
|
||||
int height = xdg_surface->configure.height;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
|
||||
if (xdg_surface->configure.width == 0 &&
|
||||
xdg_surface->configure.height == 0) {
|
||||
xdg_surface->configure.width =
|
||||
xdg_surface->configure.height = DEFAULT_WINDOW_SIZE;
|
||||
}
|
||||
|
||||
width = xdg_surface->configure.width;
|
||||
height = xdg_surface->configure.height;
|
||||
|
||||
buf = create_shm_buffer_a8r8g8b8(xdg_surface->surface->client,
|
||||
width, height);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#ifndef __HAVE_XDG_CLIENT_HELPER_H
|
||||
#define __HAVE_XDG_CLIENT_HELPER_H
|
||||
|
||||
#define DEFAULT_WINDOW_SIZE 120
|
||||
|
||||
struct xdg_client {
|
||||
struct client *client;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue