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>2019-11-25 14:49:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-11-25 14:51:20 +0300
commit62ba16d7c45083fc2b1d61f39cfe20e78896cfcd (patch)
treed9806b3d8468f08a15f84e68b0aefd2b3e2d12a1 /source/blender/editors/space_console
parentdc9b05df228e08e68e5b8b2c424a8b06eb8860bb (diff)
Fix for the Python console not setting the cursor
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r--source/blender/editors/space_console/space_console.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 65a23531963..207f508d4ee 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -146,13 +146,11 @@ static void console_main_region_init(wmWindowManager *wm, ARegion *ar)
}
/* same as 'text_cursor' */
-static void console_cursor(wmWindow *win, ScrArea *sa, ARegion *ar)
+static void console_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion *ar)
{
- SpaceText *st = sa->spacedata.first;
int wmcursor = WM_CURSOR_TEXT_EDIT;
-
- if (st->text &&
- BLI_rcti_isect_pt(&st->txtbar, win->eventstate->x - ar->winrct.xmin, st->txtbar.ymin)) {
+ const wmEvent *event = win->eventstate;
+ if (UI_view2d_mouse_in_scrollers(ar, &ar->v2d, event->x, event->y)) {
wmcursor = WM_CURSOR_DEFAULT;
}
@@ -330,6 +328,7 @@ void ED_spacetype_console(void)
art->init = console_main_region_init;
art->draw = console_main_region_draw;
art->cursor = console_cursor;
+ art->event_cursor = true;
art->listener = console_main_region_listener;
BLI_addhead(&st->regiontypes, art);