diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2013-09-10 10:32:32 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2013-09-10 10:32:32 +0400 |
commit | b6a6074b56b3d575267c80fd250998e113e8f3bd (patch) | |
tree | 28204947cfce920ca8c852c8b9fb22572a0fe53f /source | |
parent | 8f3f1103485576a3786f39dd66727bb421fc0a8a (diff) |
Change window checks to desktop size instead of screen size.
This allows to open windows stretched over monitors. Saving
stretched layouts open correctly as well.
Renamed screensize_all to desktopsize to better convey meaning.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 10 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_window.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index c2672fb060f..78a2ed9b05d 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -114,8 +114,8 @@ void wm_get_screensize(int *width_r, int *height_r) *height_r = uiheight; } -/* size of all screens, useful since the mouse is bound by this */ -void wm_get_screensize_all(int *width_r, int *height_r) +/* size of all screens (desktop), useful since the mouse is bound by this */ +void wm_get_desktopsize(int *width_r, int *height_r) { unsigned int uiwidth; unsigned int uiheight; @@ -131,7 +131,7 @@ static void wm_window_check_position(rcti *rect) { int width, height, d; - wm_get_screensize(&width, &height); + wm_get_desktopsize(&width, &height); #if defined(__APPLE__) && !defined(GHOST_COCOA) height -= 70; @@ -359,7 +359,7 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win) if (multisamples == -1) multisamples = U.ogl_multisamples; - wm_get_screensize(&scr_w, &scr_h); + wm_get_desktopsize(&scr_w, &scr_h); posy = (scr_h - win->posy - win->sizey); ghostwin = GHOST_CreateWindow(g_system, title, @@ -856,7 +856,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr GHOST_DisposeRectangle(client_rect); - wm_get_screensize_all(&scr_w, &scr_h); + wm_get_desktopsize(&scr_w, &scr_h); sizex = r - l; sizey = b - t; posx = l; diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h index d7e938fec7c..e0639b098a8 100644 --- a/source/blender/windowmanager/wm_window.h +++ b/source/blender/windowmanager/wm_window.h @@ -40,7 +40,7 @@ void wm_ghost_init (bContext *C); void wm_ghost_exit(void); void wm_get_screensize(int *width_r, int *height_r); -void wm_get_screensize_all(int *width_r, int *height_r); +void wm_get_desktopsize(int *width_r, int *height_r); wmWindow *wm_window_new (bContext *C); void wm_window_free (bContext *C, wmWindowManager *wm, wmWindow *win); |