Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/include/BIF_screen.h1
-rw-r--r--source/blender/src/editscreen.c15
-rw-r--r--source/blender/src/ghostwinlay.c6
-rw-r--r--source/creator/creator.c1
4 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/include/BIF_screen.h b/source/blender/include/BIF_screen.h
index 416df442e7c..7c61896cd7f 100644
--- a/source/blender/include/BIF_screen.h
+++ b/source/blender/include/BIF_screen.h
@@ -95,6 +95,7 @@ int is_allowed_to_change_screen(struct bScreen *newp);
void splash(void * data, int datasizei, char * string);
void screenmain(void);
void getdisplaysize(void);
+void setfullscreen(void);
void setprefsize(int stax, int stay, int sizx, int sizy);
void calc_arearcts(struct ScrArea *sa);
void resize_screen(int x, int y, int w, int h);
diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c
index 7bcd5772400..60bf34a04f8 100644
--- a/source/blender/src/editscreen.c
+++ b/source/blender/src/editscreen.c
@@ -118,7 +118,7 @@ static void wait_for_event(void);
/* ********* Globals *********** */
static Window *mainwin= NULL;
-static int prefsizx= 0, prefsizy= 0, prefstax= 0, prefstay= 0, start_maximized= 1;
+static int prefsizx= 0, prefsizy= 0, prefstax= 0, prefstay= 0, start_maximized= 1, start_fullscreen = 0;
static short dodrawscreen= 0;
static ScrArea *areawinar[MAXWIN];
static ScrArea *g_activearea= NULL;
@@ -1124,6 +1124,11 @@ void mainwindow_close(void) {
/* ********* AREAS ************* */
+void setfullscreen()
+{
+ start_fullscreen = 1;
+}
+
void setprefsize(int stax, int stay, int sizx, int sizy)
{
int scrwidth, scrheight;
@@ -1674,8 +1679,12 @@ static bScreen *addscreen(char *name) /* use setprefsize() if you want somethin
sc->scene= G.scene;
- if (!mainwin) {
- mainwin= window_open("Blender", sc->startx, sc->starty, sc->sizex, sc->sizey, start_maximized);
+ if (!mainwin) {
+ if (start_fullscreen)
+ mainwin= window_open("Blender", sc->startx, sc->starty, sc->sizex, sc->sizey, 2);
+ else
+ mainwin= window_open("Blender", sc->startx, sc->starty, sc->sizex, sc->sizey, start_maximized);
+
if (!mainwin) {
printf("ERROR: Unable to open Blender window\n");
exit(1);
diff --git a/source/blender/src/ghostwinlay.c b/source/blender/src/ghostwinlay.c
index cc67916c224..73cb6cb9f40 100644
--- a/source/blender/src/ghostwinlay.c
+++ b/source/blender/src/ghostwinlay.c
@@ -234,8 +234,10 @@ Window *window_open(char *title, int posx, int posy, int sizex, int sizey, int s
inital_state= start_maximized?
GHOST_kWindowStateFullScreen:GHOST_kWindowStateNormal;
#else
- inital_state= start_maximized?
- GHOST_kWindowStateMaximized:GHOST_kWindowStateNormal;
+ if (start_maximized == 2)
+ inital_state= GHOST_kWindowStateFullScreen;
+ else
+ inital_state= start_maximized?GHOST_kWindowStateMaximized:GHOST_kWindowStateNormal;
#endif
ghostwin= GHOST_CreateWindow(g_system,
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 851144d14bc..7da10b06f18 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -345,6 +345,7 @@ int main(int argc, char **argv)
break;
case 'W':
/* XXX, fixme zr, borderless on win32 */
+ setfullscreen();
break;
case 'n':
case 'N':