diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2009-12-02 03:57:12 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2009-12-02 03:57:12 +0300 |
commit | 5a3791ab5b2274fffde961bd01c75bacee74f634 (patch) | |
tree | 791cc3cf69436b91d82efbd292a4f3375e617bff /source | |
parent | d86a27f7b6d7b226d7369f17df6bcc3f24325e73 (diff) |
Apply patch [#20145] Ghost Win32 roundup patch: Minimum Window Size, Continuous Grab and Drag And Drop
This nice patch by Matt D. (matd in #blendercoders) adds three nice features that can be seen already in the other supported OSes:
* minimum window size: to prevent some bugs with the window manager of Blender, system windows cannot be resized smaller than the minimum size.
* Continuous Grab is finally in Windows! Default settings since alpha 0 already have the feature enabled by default, so grab a new build and enjoy :)
* GHOST support for drag and drop added. This prepares Blender for drag and drop from OS -> Blender. Currently not very useful, since wm needs to be readied for that. But it does work (do BF_GHOST_DEBUG=1 build and drag a file onto a Blender window).
Thanks Matt D.!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_cursors.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 6145871f9d4..7decf7b2ed2 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -172,12 +172,13 @@ void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds) if(hide) mode = GHOST_kGrabHide; else if(wrap) mode = GHOST_kGrabWrap; - if ((G.f & G_DEBUG) == 0) { if (win && win->ghostwin) { const GHOST_TabletData *tabletdata= GHOST_GetTabletData(win->ghostwin); - - if ((tabletdata) && (tabletdata->Active == GHOST_kTabletModeNone)) + // Note: There is no tabletdata on Windows if no tablet device is connected. + if (!tabletdata) + GHOST_SetCursorGrab(win->ghostwin, mode, bounds); + else if (tabletdata->Active == GHOST_kTabletModeNone) GHOST_SetCursorGrab(win->ghostwin, mode, bounds); } } |