BeOS/Haiku support for SDL_WINDOW_BORDERLESS.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 13 Sep 2012 01:29:18 -0400
changeset 6421 798d88be4de9
parent 6420 6f52dc57f05e
child 6422 fd0ac1b56115
BeOS/Haiku support for SDL_WINDOW_BORDERLESS.
src/video/bwindow/SDL_BWin.h
src/video/bwindow/SDL_bwindow.cc
--- a/src/video/bwindow/SDL_BWin.h	Fri Sep 14 01:16:27 2012 -0700
+++ b/src/video/bwindow/SDL_BWin.h	Thu Sep 13 01:29:18 2012 -0400
@@ -63,8 +63,8 @@
 {
   public:
   	/* Constructor/Destructor */
-    SDL_BWin(BRect bounds, uint32 flags):BDirectWindow(bounds, "Untitled",
-                                         B_TITLED_WINDOW, flags)
+    SDL_BWin(BRect bounds, window_look look, uint32 flags)
+        : BDirectWindow(bounds, "Untitled", look, B_NORMAL_WINDOW_FEEL, flags)
     {
         _last_buttons = 0;
 
--- a/src/video/bwindow/SDL_bwindow.cc	Fri Sep 14 01:16:27 2012 -0700
+++ b/src/video/bwindow/SDL_bwindow.cc	Thu Sep 13 01:29:18 2012 -0400
@@ -41,6 +41,8 @@
 
 static int _InitWindow(_THIS, SDL_Window *window) {
 	uint32 flags = 0;
+	window_look look = B_BORDERED_WINDOW_LOOK;
+
 	BRect bounds(
         window->x,
         window->y,
@@ -59,10 +61,10 @@
     	flags |= B_NOT_RESIZABLE | B_NOT_ZOOMABLE;
     }
     if(window->flags & SDL_WINDOW_BORDERLESS) {
-    	/* TODO: Add support for this flag */
+    	look = B_NO_BORDER_WINDOW_LOOK;
     }
 
-    SDL_BWin *bwin = new(std::nothrow) SDL_BWin(bounds, flags);
+    SDL_BWin *bwin = new(std::nothrow) SDL_BWin(bounds, look, flags);
     if(bwin == NULL)
     	return ENOMEM;