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:
authorCampbell Barton <ideasman42@gmail.com>2014-04-02 11:42:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-02 11:43:53 +0400
commitdef5999f9b04368aa21485b514c0931f6fb43d8e (patch)
treee14f5e992bf5555b42adf3417c83b887d4d60b21 /source/blender/windowmanager
parent442f2df736190b39e8f817832b0ce4a0520b6a22 (diff)
UI: support for dragging popups title area
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c14
-rw-r--r--source/blender/windowmanager/wm_subwindow.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index 1c20fe34a90..ecf22fea454 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -180,6 +180,20 @@ void wm_subwindow_rect_get(wmWindow *win, int swinid, rcti *r_rect)
}
+static void wm_swin_rect_set(wmSubWindow *swin, const rcti *rect)
+{
+ swin->winrct = *rect;
+}
+void wm_subwindow_rect_set(wmWindow *win, int swinid, const rcti *rect)
+{
+ wmSubWindow *swin = swin_from_swinid(win, swinid);
+
+ if (swin) {
+ wm_swin_rect_set(swin, rect);
+ }
+}
+
+
/* always sets pixel-precise 2D window/view matrices */
/* coords is in whole pixels. xmin = 15, xmax = 16: means window is 2 pix big */
int wm_subwindow_open(wmWindow *win, const rcti *winrct)
diff --git a/source/blender/windowmanager/wm_subwindow.h b/source/blender/windowmanager/wm_subwindow.h
index c1d0f9a9cac..bf7b99433c6 100644
--- a/source/blender/windowmanager/wm_subwindow.h
+++ b/source/blender/windowmanager/wm_subwindow.h
@@ -46,6 +46,7 @@ void wm_subwindow_size_get(wmWindow *win, int swinid, int *x, int *y);
void wm_subwindow_origin_get(wmWindow *win, int swinid, int *x, int *y);
void wm_subwindow_matrix_get(wmWindow *win, int swinid, float mat[4][4]);
void wm_subwindow_rect_get(wmWindow *win, int swinid, struct rcti *r_rect);
+void wm_subwindow_rect_set(wmWindow *win, int swinid, const rcti *rect);
unsigned int index_to_framebuffer(int index);