Browse Source

Small adjustments to Window

pull/83/head
falkTX 6 years ago
parent
commit
981e61a807
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      dgl/src/Window.cpp

+ 6
- 2
dgl/src/Window.cpp View File

@@ -537,6 +537,7 @@ struct Window::PrivateData {
DBG("Window setResizable called\n"); DBG("Window setResizable called\n");


fResizable = yesNo; fResizable = yesNo;
fView->user_resizable = yesNo;


#if defined(DISTRHO_OS_WINDOWS) #if defined(DISTRHO_OS_WINDOWS)
const int winFlags = fResizable ? GetWindowLong(hwnd, GWL_STYLE) | WS_SIZEBOX const int winFlags = fResizable ? GetWindowLong(hwnd, GWL_STYLE) | WS_SIZEBOX
@@ -556,6 +557,8 @@ struct Window::PrivateData {
{ {
DISTRHO_SAFE_ASSERT_RETURN(fResizable,); DISTRHO_SAFE_ASSERT_RETURN(fResizable,);


fView->min_width = width;
fView->min_height = height;
puglUpdateGeometryConstraints(fView, width, height, aspect); puglUpdateGeometryConstraints(fView, width, height, aspect);
} }


@@ -612,7 +615,6 @@ struct Window::PrivateData {
} }
} }
#else #else
XResizeWindow(xDisplay, xWindow, width, height);


if (! fResizable) if (! fResizable)
{ {
@@ -630,6 +632,8 @@ struct Window::PrivateData {
XSetWMNormalHints(xDisplay, xWindow, &sizeHints); XSetWMNormalHints(xDisplay, xWindow, &sizeHints);
} }


XResizeWindow(xDisplay, xWindow, width, height);

if (! forced) if (! forced)
XFlush(xDisplay); XFlush(xDisplay);
#endif #endif
@@ -849,7 +853,7 @@ struct Window::PrivateData {


void onPuglMotion(int x, int y) void onPuglMotion(int x, int y)
{ {
DBGp("PUGL: onMotion : %i %i\n", x, y);
// DBGp("PUGL: onMotion : %i %i\n", x, y);


if (fModal.childFocus != nullptr) if (fModal.childFocus != nullptr)
return; return;


Loading…
Cancel
Save