mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-22 23:32:03 +00:00
[client] wayland: fix fullscreen option launch bug
This commit is contained in:
@@ -75,11 +75,7 @@ static void libdecorFrameConfigure(struct libdecor_frame * frame,
|
||||
struct libdecor_configuration * configuration, void * opaque)
|
||||
{
|
||||
if (!state.configured)
|
||||
{
|
||||
xdg_surface_ack_configure(libdecor_frame_get_xdg_surface(frame), configuration->serial);
|
||||
state.configured = true;
|
||||
return;
|
||||
}
|
||||
|
||||
int width, height;
|
||||
if (libdecor_configuration_get_content_size(configuration, frame, &width, &height))
|
||||
@@ -96,6 +92,12 @@ static void libdecorFrameConfigure(struct libdecor_frame * frame,
|
||||
if (libdecor_configuration_get_window_state(configuration, &windowState))
|
||||
state.fullscreen = windowState & LIBDECOR_WINDOW_STATE_FULLSCREEN;
|
||||
|
||||
if (!state.configured)
|
||||
{
|
||||
state.configured = true;
|
||||
return;
|
||||
}
|
||||
|
||||
state.resizeSerial = configuration->serial;
|
||||
waylandNeedsResize();
|
||||
}
|
||||
|
||||
@@ -93,8 +93,13 @@ static const struct xdg_surface_listener xdgSurfaceListener = {
|
||||
static void xdgToplevelConfigure(void * data, struct xdg_toplevel * xdgToplevel,
|
||||
int32_t width, int32_t height, struct wl_array * states)
|
||||
{
|
||||
state.width = width;
|
||||
state.height = height;
|
||||
// A zero size means that the compositor is leaving the size up to us.
|
||||
if (width > 0 && height > 0)
|
||||
{
|
||||
state.width = width;
|
||||
state.height = height;
|
||||
}
|
||||
|
||||
state.fullscreen = false;
|
||||
state.floating = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user