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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-28 02:39:40 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-28 02:41:01 +0400
commitd7a2d2b693c7b058d268e7d008616fd9d284675c (patch)
treeb6caf06cd2415f23994e84ad5cd6f62f6ef3ef43
parentde6b64bca65e340315b5eb3e5f766749efd0404e (diff)
Fix T38876: hide area split widget in lower left of widget on OS X.
This is already used by the operating system for window resizing, you must use the widget in the top right of the area to split.
-rw-r--r--source/blender/editors/screen/area.c28
-rw-r--r--source/blender/windowmanager/WM_api.h1
-rw-r--r--source/blender/windowmanager/intern/wm_window.c6
3 files changed, 24 insertions, 11 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 1a4f7c69bd7..dbd12dbbf63 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -559,7 +559,7 @@ void ED_area_headerprint(ScrArea *sa, const char *str)
/* ************************************************************ */
-static void area_azone_initialize(bScreen *screen, ScrArea *sa)
+static void area_azone_initialize(wmWindow *win, bScreen *screen, ScrArea *sa)
{
AZone *az;
@@ -570,15 +570,21 @@ static void area_azone_initialize(bScreen *screen, ScrArea *sa)
return;
}
- /* set area action zones */
- az = (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
- BLI_addtail(&(sa->actionzones), az);
- az->type = AZONE_AREA;
- az->x1 = sa->totrct.xmin;
- az->y1 = sa->totrct.ymin;
- az->x2 = sa->totrct.xmin + (AZONESPOT - 1);
- az->y2 = sa->totrct.ymin + (AZONESPOT - 1);
- BLI_rcti_init(&az->rect, az->x1, az->x2, az->y1, az->y2);
+ /* can't click on bottom corners on OS X, already used for resizing */
+#ifdef __APPLE__
+ if(!(sa->totrct.xmin == 0 && sa->totrct.ymin == 0) || WM_window_is_fullscreen(win))
+#endif
+ {
+ /* set area action zones */
+ az = (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
+ BLI_addtail(&(sa->actionzones), az);
+ az->type = AZONE_AREA;
+ az->x1 = sa->totrct.xmin;
+ az->y1 = sa->totrct.ymin;
+ az->x2 = sa->totrct.xmin + (AZONESPOT - 1);
+ az->y2 = sa->totrct.ymin + (AZONESPOT - 1);
+ BLI_rcti_init(&az->rect, az->x1, az->x2, az->y1, az->y2);
+ }
az = (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
BLI_addtail(&(sa->actionzones), az);
@@ -1274,7 +1280,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa)
area_calc_totrct(sa, WM_window_pixels_x(win), WM_window_pixels_y(win));
/* clear all azones, add the area triange widgets */
- area_azone_initialize(win->screen, sa);
+ area_azone_initialize(win, win->screen, sa);
/* region rect sizes */
rect = sa->totrct;
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index c88c5496ea6..661e940facb 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -92,6 +92,7 @@ struct wmWindow *WM_window_open (struct bContext *C, const struct rcti *rect);
int WM_window_pixels_x (struct wmWindow *win);
int WM_window_pixels_y (struct wmWindow *win);
+bool WM_window_is_fullscreen (struct wmWindow *win);
/* defines for 'type' WM_window_open_temp */
#define WM_WINDOW_RENDER 0
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index d5ad1c7e139..6a2ef471be0 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1440,3 +1440,9 @@ int WM_window_pixels_y(wmWindow *win)
return (int)(f * (float)win->sizey);
}
+
+bool WM_window_is_fullscreen(wmWindow *win)
+{
+ return win->windowstate == GHOST_kWindowStateFullScreen;
+}
+