src/video/haiku/SDL_BWin.h
changeset 10385 ad12658bc7ae
parent 9998 f67cf37e9cd4
child 10388 0190965b0ec5
     1.1 --- a/src/video/haiku/SDL_BWin.h	Thu Sep 29 16:52:48 2016 -0700
     1.2 +++ b/src/video/haiku/SDL_BWin.h	Thu Sep 29 22:52:41 2016 -0400
     1.3 @@ -56,6 +56,7 @@
     1.4      BWIN_RESTORE_WINDOW,
     1.5      BWIN_SET_TITLE,
     1.6      BWIN_SET_BORDERED,
     1.7 +    BWIN_SET_RESIZABLE,
     1.8      BWIN_FULLSCREEN
     1.9  };
    1.10  
    1.11 @@ -378,6 +379,9 @@
    1.12              case BWIN_SET_BORDERED:
    1.13                  _SetBordered(message);
    1.14                  break;
    1.15 +            case BWIN_SET_RESIZABLE:
    1.16 +                _SetResizable(message);
    1.17 +                break;
    1.18              case BWIN_SHOW_WINDOW:
    1.19                  Show();
    1.20                  break;
    1.21 @@ -568,6 +572,18 @@
    1.22          SetLook(bEnabled ? B_BORDERED_WINDOW_LOOK : B_NO_BORDER_WINDOW_LOOK);
    1.23      }
    1.24  
    1.25 +    void _SetResizable(BMessage *msg) {
    1.26 +        bool bEnabled;
    1.27 +        if(msg->FindBool("window-resizable", &bEnabled) != B_OK) {
    1.28 +            return;
    1.29 +        }
    1.30 +        if (bEnabled) {
    1.31 +            SetFlags(GetFlags() & ~(B_NOT_RESIZABLE | B_NOT_ZOOMABLE));
    1.32 +        } else {
    1.33 +            SetFlags(GetFlags() | (B_NOT_RESIZABLE | B_NOT_ZOOMABLE));
    1.34 +        }
    1.35 +    }
    1.36 +
    1.37      void _Restore() {
    1.38          if(IsMinimized()) {
    1.39              Minimize(false);