Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(479)

Unified Diff: source/blender/editors/screen/screen_edit.c

Issue 6200062: Frame node upgrade and general node editor tweaks Base URL: https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Patch Set: Yet another way of setting the node resize cursor Created 12 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/blender/editors/interface/resources.c ('k') | source/blender/editors/space_node/drawnode.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/blender/editors/screen/screen_edit.c
===================================================================
--- source/blender/editors/screen/screen_edit.c (revision 46869)
+++ source/blender/editors/screen/screen_edit.c (working copy)
@@ -944,7 +944,7 @@
}
/* screen sets cursor based on swinid */
-static void region_cursor_set(wmWindow *win, int swinid)
+static void region_cursor_set(wmWindow *win, int swinid, int swin_changed)
{
ScrArea *sa = win->screen->areabase.first;
@@ -952,10 +952,12 @@
ARegion *ar = sa->regionbase.first;
for (; ar; ar = ar->next) {
if (ar->swinid == swinid) {
- if (ar->type && ar->type->cursor)
- ar->type->cursor(win, sa, ar);
- else
- WM_cursor_set(win, CURSOR_STD);
+ if (swin_changed || (ar->type && ar->type->event_cursor)) {
+ if (ar->type && ar->type->cursor)
+ ar->type->cursor(win, sa, ar);
+ else
+ WM_cursor_set(win, CURSOR_STD);
+ }
return;
}
}
@@ -983,7 +985,7 @@
break;
case NC_SCENE:
if (note->data == ND_MODE)
- region_cursor_set(win, note->swinid);
+ region_cursor_set(win, note->swinid, TRUE);
break;
}
}
@@ -1239,9 +1241,7 @@
else
WM_cursor_set(win, CURSOR_X_MOVE);
}
- else
- WM_cursor_set(win, CURSOR_STD);
- }
+ }
}
@@ -1294,9 +1294,13 @@
if (scr->subwinactive == scr->mainwin) {
screen_cursor_set(win, event);
}
- else if (oldswin != scr->subwinactive) {
- region_cursor_set(win, scr->subwinactive);
- WM_event_add_notifier(C, NC_SCREEN | ND_SUBWINACTIVE, scr);
+ else {
+ if (oldswin != scr->subwinactive) {
+ region_cursor_set(win, scr->subwinactive, TRUE);
+ WM_event_add_notifier(C, NC_SCREEN | ND_SUBWINACTIVE, scr);
+ }
+ else
+ region_cursor_set(win, scr->subwinactive, FALSE);
}
}
}
« no previous file with comments | « source/blender/editors/interface/resources.c ('k') | source/blender/editors/space_node/drawnode.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b