mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-09-02 21:30:52 +00:00
[client] wayland: xdg handles resizable
Added missing resizable functionality to xdg_shellInit when win:allowResize is set to true
This commit is contained in:

committed by
Geoffrey McRae

parent
f7e0b9746a
commit
3f35b0b0af
@@ -49,6 +49,7 @@ typedef struct XDGState
|
|||||||
uint32_t resizeSerial;
|
uint32_t resizeSerial;
|
||||||
bool fullscreen;
|
bool fullscreen;
|
||||||
bool floating;
|
bool floating;
|
||||||
|
bool resizable;
|
||||||
int displayFd;
|
int displayFd;
|
||||||
}
|
}
|
||||||
XDGState;
|
XDGState;
|
||||||
@@ -155,6 +156,13 @@ bool xdg_shellInit(struct wl_display * display, struct wl_surface * surface,
|
|||||||
if (maximize)
|
if (maximize)
|
||||||
xdg_toplevel_set_maximized(state.toplevel);
|
xdg_toplevel_set_maximized(state.toplevel);
|
||||||
|
|
||||||
|
if (!resizable)
|
||||||
|
{
|
||||||
|
xdg_toplevel_set_min_size(state.toplevel, state.width, state.height);
|
||||||
|
xdg_toplevel_set_max_size(state.toplevel, state.width, state.height);
|
||||||
|
}
|
||||||
|
state.resizable = resizable;
|
||||||
|
|
||||||
if (state.decorationManager)
|
if (state.decorationManager)
|
||||||
{
|
{
|
||||||
state.toplevelDecoration = zxdg_decoration_manager_v1_get_toplevel_decoration(
|
state.toplevelDecoration = zxdg_decoration_manager_v1_get_toplevel_decoration(
|
||||||
@@ -200,7 +208,7 @@ static void xdg_minimize(void)
|
|||||||
|
|
||||||
static void xdg_shellResize(int w, int h)
|
static void xdg_shellResize(int w, int h)
|
||||||
{
|
{
|
||||||
if (!state.floating)
|
if (!state.floating || !state.resizable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
state.width = w;
|
state.width = w;
|
||||||
|
Reference in New Issue
Block a user