Improved embedded mode when mapping windows
This commit is contained in:
parent
d151e2fedc
commit
dd481871aa
20
src/main.c
20
src/main.c
|
@ -165,7 +165,7 @@ static GdkFilterReturn _filter_configure_request(
|
||||||
XConfigureRequestEvent * xconfigure, Framer * framer)
|
XConfigureRequestEvent * xconfigure, Framer * framer)
|
||||||
{
|
{
|
||||||
XWindowChanges wc;
|
XWindowChanges wc;
|
||||||
unsigned long mask;
|
unsigned long mask = xconfigure->value_mask;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "DEBUG: %s() (%d,%d) %dx%d %lu\n", __func__,
|
fprintf(stderr, "DEBUG: %s() (%d,%d) %dx%d %lu\n", __func__,
|
||||||
|
@ -182,21 +182,23 @@ static GdkFilterReturn _filter_configure_request(
|
||||||
wc.width = min(xconfigure->width, framer->width);
|
wc.width = min(xconfigure->width, framer->width);
|
||||||
if(xconfigure->value_mask & CWHeight)
|
if(xconfigure->value_mask & CWHeight)
|
||||||
wc.height = min(xconfigure->height, framer->height - 64);
|
wc.height = min(xconfigure->height, framer->height - 64);
|
||||||
mask = CWX | CWY | CWWidth | CWHeight;
|
|
||||||
#else
|
#else
|
||||||
if(xconfigure->value_mask & CWX)
|
if(xconfigure->value_mask & (CWX | CWWidth))
|
||||||
|
{
|
||||||
wc.x = 0;
|
wc.x = 0;
|
||||||
if(xconfigure->value_mask & CWY)
|
|
||||||
wc.y = 0;
|
|
||||||
if(xconfigure->value_mask & CWWidth)
|
|
||||||
wc.width = framer->width;
|
wc.width = framer->width;
|
||||||
if(xconfigure->value_mask & CWHeight)
|
mask |= CWX | CWWidth;
|
||||||
|
}
|
||||||
|
if(xconfigure->value_mask & (CWY | CWHeight))
|
||||||
|
{
|
||||||
|
wc.y = 0;
|
||||||
|
mask |= CWY | CWHeight;
|
||||||
wc.height = framer->height - 64;
|
wc.height = framer->height - 64;
|
||||||
|
}
|
||||||
if(xconfigure->value_mask & CWBorderWidth)
|
if(xconfigure->value_mask & CWBorderWidth)
|
||||||
wc.border_width = 0;
|
wc.border_width = 0;
|
||||||
#endif
|
#endif
|
||||||
XConfigureWindow(xconfigure->display, xconfigure->window,
|
XConfigureWindow(xconfigure->display, xconfigure->window, mask, &wc);
|
||||||
xconfigure->value_mask, &wc);
|
|
||||||
return GDK_FILTER_REMOVE;
|
return GDK_FILTER_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user