Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_event_system.c
| Show First 20 Lines • Show All 400 Lines • ▼ Show 20 Lines | for (win = wm->windows.first; win; win = win->next) { | ||||
| } | } | ||||
| } | } | ||||
| /* the notifiers are sent without context, to keep it clean */ | /* the notifiers are sent without context, to keep it clean */ | ||||
| while ((note = BLI_pophead(&wm->queue))) { | while ((note = BLI_pophead(&wm->queue))) { | ||||
| for (win = wm->windows.first; win; win = win->next) { | for (win = wm->windows.first; win; win = win->next) { | ||||
| Scene *scene = WM_window_get_active_scene(win); | Scene *scene = WM_window_get_active_scene(win); | ||||
| bScreen *screen = WM_window_get_active_screen(win); | bScreen *screen = WM_window_get_active_screen(win); | ||||
| WorkSpace *workspace = WM_window_get_active_workspace(win); | |||||
| /* filter out notifiers */ | /* filter out notifiers */ | ||||
| if (note->category == NC_SCREEN && | if (note->category == NC_SCREEN && | ||||
| note->reference && | note->reference && | ||||
| note->reference != screen && | note->reference != screen && | ||||
| note->reference != WM_window_get_active_workspace(win) && | note->reference != workspace && | ||||
| note->reference != WM_window_get_active_layout(win)) | note->reference != WM_window_get_active_layout(win)) | ||||
| { | { | ||||
| /* pass */ | /* pass */ | ||||
| } | } | ||||
| else if (note->category == NC_SCENE && note->reference && note->reference != scene) { | else if (note->category == NC_SCENE && note->reference && note->reference != scene) { | ||||
| /* pass */ | /* pass */ | ||||
| } | } | ||||
| else { | else { | ||||
| ScrArea *sa; | ScrArea *sa; | ||||
| ARegion *ar; | ARegion *ar; | ||||
| /* XXX context in notifiers? */ | /* XXX context in notifiers? */ | ||||
| CTX_wm_window_set(C, win); | CTX_wm_window_set(C, win); | ||||
| /* printf("notifier win %d screen %s cat %x\n", win->winid, win->screen->id.name + 2, note->category); */ | /* printf("notifier win %d screen %s cat %x\n", win->winid, win->screen->id.name + 2, note->category); */ | ||||
| ED_screen_do_listen(C, note); | ED_screen_do_listen(C, note); | ||||
| for (ar = screen->regionbase.first; ar; ar = ar->next) { | for (ar = screen->regionbase.first; ar; ar = ar->next) { | ||||
| ED_region_do_listen(screen, NULL, ar, note, scene); | ED_region_do_listen(screen, NULL, ar, note, scene); | ||||
| } | } | ||||
| for (sa = screen->areabase.first; sa; sa = sa->next) { | for (sa = screen->areabase.first; sa; sa = sa->next) { | ||||
| ED_area_do_listen(screen, sa, note, scene); | ED_area_do_listen(screen, sa, note, scene, workspace); | ||||
| for (ar = sa->regionbase.first; ar; ar = ar->next) { | for (ar = sa->regionbase.first; ar; ar = ar->next) { | ||||
| ED_region_do_listen(screen, sa, ar, note, scene); | ED_region_do_listen(screen, sa, ar, note, scene); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| MEM_freeN(note); | MEM_freeN(note); | ||||
| ▲ Show 20 Lines • Show All 3,484 Lines • Show Last 20 Lines | |||||