Page MenuHome

bordless.patch

bordless.patch

Index: intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- intern/ghost/intern/GHOST_WindowWin32.cpp (revision 31920)
+++ intern/ghost/intern/GHOST_WindowWin32.cpp (working copy)
@@ -294,6 +294,11 @@
}
}
}
+
+ /* Set the state. It works well for the initial/first windows,
+ but when you launch preferences (Ctrl+Alt+U) the state is still
+ Fullscreen, what messes up with everything*/
+ this->setState(state);
}
Index: source/blender/windowmanager/intern/wm_window.c
===================================================================
--- source/blender/windowmanager/intern/wm_window.c (revision 31920)
+++ source/blender/windowmanager/intern/wm_window.c (working copy)
@@ -67,7 +67,7 @@
GHOST_SystemHandle g_system= NULL;
/* set by commandline */
-static int prefsizx= 0, prefsizy= 0, prefstax= 0, prefstay= 0;
+static int prefsizx= 0, prefsizy= 0, prefstax= 0, prefstay= 0, initialstate= GHOST_kWindowStateNormal;
/* ******** win open & close ************ */
@@ -292,16 +292,12 @@
static void wm_window_add_ghostwindow(wmWindowManager *wm, char *title, wmWindow *win)
{
GHOST_WindowHandle ghostwin;
- GHOST_TWindowState inital_state;
int scr_w, scr_h, posy;
+ GHOST_TWindowState inital_state= initialstate;
wm_get_screensize(&scr_w, &scr_h);
posy= (scr_h - win->posy - win->sizey);
- // inital_state = GHOST_kWindowStateFullScreen;
- // inital_state = GHOST_kWindowStateMaximized;
- inital_state = GHOST_kWindowStateNormal;
-
#if defined(__APPLE__) && !defined(GHOST_COCOA)
{
extern int macPrefState; /* creator.c */
@@ -372,7 +368,7 @@
win->posy= prefstay;
win->sizex= prefsizx;
win->sizey= prefsizy;
- win->windowstate= 0;
+ win->windowstate= initialstate;
}
wm_window_add_ghostwindow(wm, "Blender", win);
}
@@ -391,6 +387,7 @@
WM_event_add_keymap_handler(&win->modalhandlers, keymap);
wm_window_title(wm, win);
+
}
}
@@ -1106,6 +1103,17 @@
prefsizy= sizy;
}
+/* for borderless and border windows set from command-line */
+void WM_setinitialstate_fullscreen()
+{
+ initialstate= GHOST_kWindowStateFullScreen;
+}
+
+void WM_setinitialstate_normal()
+{
+ initialstate= GHOST_kWindowStateNormal;
+}
+
/* This function requires access to the GHOST_SystemHandle (g_system) */
void WM_cursor_warp(wmWindow *win, int x, int y)
{
Index: source/blender/windowmanager/WM_api.h
===================================================================
--- source/blender/windowmanager/WM_api.h (revision 31920)
+++ source/blender/windowmanager/WM_api.h (working copy)
@@ -52,6 +52,8 @@
/* general API */
void WM_setprefsize (int stax, int stay, int sizx, int sizy);
+void WM_setinitialstate_fullscreen();
+void WM_setinitialstate_normal();
void WM_init (struct bContext *C, int argc, char **argv);
void WM_exit (struct bContext *C);
@@ -157,6 +159,7 @@
int (*func)(struct bContext *C, struct wmEvent *event, void *userdata),
void (*remove)(struct bContext *C, void *userdata), void *userdata);
void WM_event_remove_area_handler(struct ListBase *handlers, void *area);
+void WM_event_remove_fileselect_handler(struct ListBase *handlers);
struct wmEventHandler *WM_event_add_modal_handler(struct bContext *C, struct wmOperator *op);
void WM_event_remove_handlers(struct bContext *C, ListBase *handlers);
Index: source/creator/creator.c
===================================================================
--- source/creator/creator.c (revision 31920)
+++ source/creator/creator.c (working copy)
@@ -412,16 +412,13 @@
static int with_borders(int argc, char **argv, void *data)
{
- /* with borders XXX OLD CRUFT!*/
-
+ WM_setinitialstate_normal();
return 0;
}
static int without_borders(int argc, char **argv, void *data)
{
- /* borderless, win + linux XXX OLD CRUFT */
- /* XXX, fixme mein, borderless on OSX */
-
+ WM_setinitialstate_fullscreen();
return 0;
}

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
85/49/965f58bf80908183fe109568c490

Event Timeline