Cleanup: pass notifiers as const
This commit is contained in:
parent
578dff7863
commit
de1a2d7988
|
@ -55,7 +55,7 @@ struct wmWindowManager;
|
|||
typedef struct wmSpaceTypeListenerParams {
|
||||
struct wmWindow *window;
|
||||
struct ScrArea *area;
|
||||
struct wmNotifier *notifier;
|
||||
const struct wmNotifier *notifier;
|
||||
const struct Scene *scene;
|
||||
} wmSpaceTypeListenerParams;
|
||||
|
||||
|
@ -124,7 +124,7 @@ typedef struct wmRegionListenerParams {
|
|||
struct wmWindow *window;
|
||||
struct ScrArea *area; /* Can be NULL when the region is not part of an area. */
|
||||
struct ARegion *region;
|
||||
struct wmNotifier *notifier;
|
||||
const struct wmNotifier *notifier;
|
||||
const struct Scene *scene;
|
||||
} wmRegionListenerParams;
|
||||
|
||||
|
|
|
@ -294,7 +294,7 @@ void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win);
|
|||
void ED_screen_ensure_updated(struct wmWindowManager *wm,
|
||||
struct wmWindow *win,
|
||||
struct bScreen *screen);
|
||||
void ED_screen_do_listen(struct bContext *C, struct wmNotifier *note);
|
||||
void ED_screen_do_listen(struct bContext *C, const struct wmNotifier *note);
|
||||
/**
|
||||
* \brief Change the active screen.
|
||||
*
|
||||
|
|
|
@ -397,7 +397,7 @@ static void ui_block_region_draw(const bContext *C, ARegion *region)
|
|||
static void ui_block_region_popup_window_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
switch (wmn->category) {
|
||||
case NC_WINDOW: {
|
||||
|
|
|
@ -127,7 +127,7 @@ void ED_region_pixelspace(const ARegion *region)
|
|||
void ED_region_do_listen(wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *notifier = params->notifier;
|
||||
const wmNotifier *notifier = params->notifier;
|
||||
|
||||
/* generic notes first */
|
||||
switch (notifier->category) {
|
||||
|
|
|
@ -580,7 +580,7 @@ static void region_cursor_set(wmWindow *win, bool swin_changed)
|
|||
}
|
||||
}
|
||||
|
||||
void ED_screen_do_listen(bContext *C, wmNotifier *note)
|
||||
void ED_screen_do_listen(bContext *C, const wmNotifier *note)
|
||||
{
|
||||
wmWindow *win = CTX_wm_window(C);
|
||||
bScreen *screen = CTX_wm_screen(C);
|
||||
|
|
|
@ -307,7 +307,7 @@ static void action_header_region_draw(const bContext *C, ARegion *region)
|
|||
static void action_channel_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -401,7 +401,7 @@ static void saction_channel_region_message_subscribe(const wmRegionMessageSubscr
|
|||
static void action_main_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -499,7 +499,7 @@ static void saction_main_region_message_subscribe(const wmRegionMessageSubscribe
|
|||
static void action_listener(const wmSpaceTypeListenerParams *params)
|
||||
{
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
SpaceAction *saction = (SpaceAction *)area->spacedata.first;
|
||||
|
||||
/* context changes */
|
||||
|
@ -653,7 +653,7 @@ static void action_header_region_listener(const wmRegionListenerParams *params)
|
|||
{
|
||||
ScrArea *area = params->area;
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
SpaceAction *saction = (SpaceAction *)area->spacedata.first;
|
||||
|
||||
/* context changes */
|
||||
|
@ -728,7 +728,7 @@ static void action_buttons_area_draw(const bContext *C, ARegion *region)
|
|||
static void action_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -507,7 +507,7 @@ static void buttons_main_region_layout(const bContext *C, ARegion *region)
|
|||
static void buttons_main_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -645,7 +645,7 @@ static void buttons_area_redraw(ScrArea *area, short buttons)
|
|||
static void buttons_area_listener(const wmSpaceTypeListenerParams *params)
|
||||
{
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
SpaceProperties *sbuts = area->spacedata.first;
|
||||
|
||||
/* context changes */
|
||||
|
|
|
@ -314,7 +314,7 @@ static SpaceLink *clip_duplicate(SpaceLink *sl)
|
|||
static void clip_listener(const wmSpaceTypeListenerParams *params)
|
||||
{
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
const Scene *scene = params->scene;
|
||||
|
||||
/* context changes */
|
||||
|
@ -919,7 +919,7 @@ static void clip_main_region_draw(const bContext *C, ARegion *region)
|
|||
static void clip_main_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -1118,7 +1118,7 @@ static void clip_header_region_draw(const bContext *C, ARegion *region)
|
|||
static void clip_header_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -1160,7 +1160,7 @@ static void clip_tools_region_draw(const bContext *C, ARegion *region)
|
|||
static void clip_props_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -1212,7 +1212,7 @@ static void clip_properties_region_draw(const bContext *C, ARegion *region)
|
|||
static void clip_properties_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -257,7 +257,7 @@ static void console_main_region_listener(const wmRegionListenerParams *params)
|
|||
{
|
||||
ScrArea *area = params->area;
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -426,7 +426,7 @@ static void file_reset_filelist_showing_main_data(ScrArea *area, SpaceFile *sfil
|
|||
static void file_listener(const wmSpaceTypeListenerParams *listener_params)
|
||||
{
|
||||
ScrArea *area = listener_params->area;
|
||||
wmNotifier *wmn = listener_params->notifier;
|
||||
const wmNotifier *wmn = listener_params->notifier;
|
||||
SpaceFile *sfile = (SpaceFile *)area->spacedata.first;
|
||||
|
||||
/* context changes */
|
||||
|
@ -514,7 +514,7 @@ static void file_main_region_init(wmWindowManager *wm, ARegion *region)
|
|||
static void file_main_region_listener(const wmRegionListenerParams *listener_params)
|
||||
{
|
||||
ARegion *region = listener_params->region;
|
||||
wmNotifier *wmn = listener_params->notifier;
|
||||
const wmNotifier *wmn = listener_params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -820,7 +820,7 @@ static void file_execution_region_draw(const bContext *C, ARegion *region)
|
|||
static void file_ui_region_listener(const wmRegionListenerParams *listener_params)
|
||||
{
|
||||
ARegion *region = listener_params->region;
|
||||
wmNotifier *wmn = listener_params->notifier;
|
||||
const wmNotifier *wmn = listener_params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -393,7 +393,7 @@ static void graph_buttons_region_draw(const bContext *C, ARegion *region)
|
|||
static void graph_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -529,7 +529,7 @@ static void graph_region_message_subscribe(const wmRegionMessageSubscribeParams
|
|||
static void graph_listener(const wmSpaceTypeListenerParams *params)
|
||||
{
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
SpaceGraph *sipo = (SpaceGraph *)area->spacedata.first;
|
||||
|
||||
/* context changes */
|
||||
|
|
|
@ -298,7 +298,7 @@ static void image_listener(const wmSpaceTypeListenerParams *params)
|
|||
{
|
||||
wmWindow *win = params->window;
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
SpaceImage *sima = (SpaceImage *)area->spacedata.first;
|
||||
|
||||
/* context changes */
|
||||
|
@ -713,7 +713,7 @@ static void image_main_region_listener(const wmRegionListenerParams *params)
|
|||
{
|
||||
ScrArea *area = params->area;
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -827,7 +827,7 @@ static void image_buttons_region_draw(const bContext *C, ARegion *region)
|
|||
static void image_buttons_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -889,7 +889,7 @@ static void image_tools_region_draw(const bContext *C, ARegion *region)
|
|||
static void image_tools_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -945,7 +945,7 @@ static void image_header_region_draw(const bContext *C, ARegion *region)
|
|||
static void image_header_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -186,7 +186,7 @@ static void info_header_region_draw(const bContext *C, ARegion *region)
|
|||
static void info_main_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -202,7 +202,7 @@ static void info_main_region_listener(const wmRegionListenerParams *params)
|
|||
static void info_header_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -303,7 +303,7 @@ static void nla_buttons_region_draw(const bContext *C, ARegion *region)
|
|||
static void nla_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -342,7 +342,7 @@ static void nla_region_listener(const wmRegionListenerParams *params)
|
|||
static void nla_main_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -436,7 +436,7 @@ static void nla_main_region_message_subscribe(const wmRegionMessageSubscribePara
|
|||
static void nla_channel_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -512,7 +512,7 @@ static void nla_channel_region_message_subscribe(const wmRegionMessageSubscribeP
|
|||
static void nla_listener(const wmSpaceTypeListenerParams *params)
|
||||
{
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -362,7 +362,7 @@ static void node_area_tag_tree_recalc(SpaceNode *snode, ScrArea *area)
|
|||
static void node_area_listener(const wmSpaceTypeListenerParams *params)
|
||||
{
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* NOTE: #ED_area_tag_refresh will re-execute compositor. */
|
||||
SpaceNode *snode = (SpaceNode *)area->spacedata.first;
|
||||
|
@ -753,7 +753,7 @@ static void node_header_region_draw(const bContext *C, ARegion *region)
|
|||
static void node_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
wmGizmoMap *gzmap = region->gizmo_map;
|
||||
|
||||
/* context changes */
|
||||
|
|
|
@ -95,7 +95,7 @@ static void outliner_main_region_listener(const wmRegionListenerParams *params)
|
|||
{
|
||||
ScrArea *area = params->area;
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
SpaceOutliner *space_outliner = static_cast<SpaceOutliner *>(area->spacedata.first);
|
||||
|
||||
/* context changes */
|
||||
|
@ -291,7 +291,7 @@ static void outliner_header_region_free(ARegion *UNUSED(region))
|
|||
static void outliner_header_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -374,7 +374,7 @@ static SpaceLink *sequencer_duplicate(SpaceLink *sl)
|
|||
static void sequencer_listener(const wmSpaceTypeListenerParams *params)
|
||||
{
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* Context changes. */
|
||||
switch (wmn->category) {
|
||||
|
@ -630,7 +630,7 @@ static void sequencer_main_region_view2d_changed(const bContext *C, ARegion *reg
|
|||
static void sequencer_main_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* Context changes. */
|
||||
switch (wmn->category) {
|
||||
|
@ -862,7 +862,7 @@ static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
|
|||
static void sequencer_preview_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
WM_gizmomap_tag_refresh(region->gizmo_map);
|
||||
|
||||
|
@ -933,7 +933,7 @@ static void sequencer_buttons_region_draw(const bContext *C, ARegion *region)
|
|||
static void sequencer_buttons_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* Context changes. */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -436,7 +436,7 @@ static void spreadsheet_main_region_draw(const bContext *C, ARegion *region)
|
|||
static void spreadsheet_main_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
switch (wmn->category) {
|
||||
case NC_SCENE: {
|
||||
|
@ -486,7 +486,7 @@ static void spreadsheet_header_region_free(ARegion *UNUSED(region))
|
|||
static void spreadsheet_header_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
switch (wmn->category) {
|
||||
case NC_SCENE: {
|
||||
|
@ -570,7 +570,7 @@ static void spreadsheet_footer_region_listener(const wmRegionListenerParams *UNU
|
|||
static void spreadsheet_dataset_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
switch (wmn->category) {
|
||||
case NC_SCENE: {
|
||||
|
|
|
@ -83,7 +83,7 @@ static void statusbar_keymap(struct wmKeyConfig *UNUSED(keyconf))
|
|||
static void statusbar_header_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -109,7 +109,7 @@ static SpaceLink *text_duplicate(SpaceLink *sl)
|
|||
static void text_listener(const wmSpaceTypeListenerParams *params)
|
||||
{
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
SpaceText *st = area->spacedata.first;
|
||||
|
||||
/* context changes */
|
||||
|
|
|
@ -116,7 +116,7 @@ static void topbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *regi
|
|||
static void topbar_main_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -146,7 +146,7 @@ static void topbar_main_region_listener(const wmRegionListenerParams *params)
|
|||
static void topbar_header_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
|
|
@ -1037,7 +1037,7 @@ static void view3d_main_region_listener(const wmRegionListenerParams *params)
|
|||
wmWindow *window = params->window;
|
||||
ScrArea *area = params->area;
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
const Scene *scene = params->scene;
|
||||
View3D *v3d = area->spacedata.first;
|
||||
RegionView3D *rv3d = region->regiondata;
|
||||
|
@ -1467,7 +1467,7 @@ static void view3d_header_region_draw(const bContext *C, ARegion *region)
|
|||
static void view3d_header_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -1684,7 +1684,7 @@ static void view3d_buttons_region_layout(const bContext *C, ARegion *region)
|
|||
static void view3d_buttons_region_listener(const wmRegionListenerParams *params)
|
||||
{
|
||||
ARegion *region = params->region;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
|
||||
/* context changes */
|
||||
switch (wmn->category) {
|
||||
|
@ -1807,7 +1807,7 @@ static void view3d_tools_region_draw(const bContext *C, ARegion *region)
|
|||
static void space_view3d_listener(const wmSpaceTypeListenerParams *params)
|
||||
{
|
||||
ScrArea *area = params->area;
|
||||
wmNotifier *wmn = params->notifier;
|
||||
const wmNotifier *wmn = params->notifier;
|
||||
View3D *v3d = area->spacedata.first;
|
||||
|
||||
/* context changes */
|
||||
|
|
|
@ -149,7 +149,12 @@ typedef struct wmWindowManager {
|
|||
/** Operator registry. */
|
||||
ListBase operators;
|
||||
|
||||
/** Refresh/redraw #wmNotifier structs. */
|
||||
/**
|
||||
* Refresh/redraw #wmNotifier structs.
|
||||
* \note Once in the queue, notifiers should be considered read-only.
|
||||
* With the exception of clearing notifiers for data which has been removed,
|
||||
* see: #NOTE_CATEGORY_TAG_CLEARED.
|
||||
*/
|
||||
ListBase notifier_queue;
|
||||
/**
|
||||
* For duplicate detection.
|
||||
|
|
|
@ -492,7 +492,7 @@ void wm_event_do_notifiers(bContext *C)
|
|||
|
||||
CTX_wm_window_set(C, win);
|
||||
|
||||
LISTBASE_FOREACH_MUTABLE (wmNotifier *, note, &wm->notifier_queue) {
|
||||
LISTBASE_FOREACH_MUTABLE (const wmNotifier *, note, &wm->notifier_queue) {
|
||||
if (note->category == NC_WM) {
|
||||
if (ELEM(note->data, ND_FILEREAD, ND_FILESAVE)) {
|
||||
wm->file_saved = 1;
|
||||
|
@ -584,10 +584,10 @@ void wm_event_do_notifiers(bContext *C)
|
|||
}
|
||||
|
||||
/* The notifiers are sent without context, to keep it clean. */
|
||||
wmNotifier *note;
|
||||
while ((note = static_cast<wmNotifier *>(BLI_pophead(&wm->notifier_queue)))) {
|
||||
const wmNotifier *note;
|
||||
while ((note = static_cast<const wmNotifier *>(BLI_pophead(&wm->notifier_queue)))) {
|
||||
if (wm_notifier_is_clear(note)) {
|
||||
MEM_freeN(note);
|
||||
MEM_freeN((void *)note);
|
||||
continue;
|
||||
}
|
||||
const bool removed = BLI_gset_remove(wm->notifier_queue_set, note, nullptr);
|
||||
|
@ -656,7 +656,7 @@ void wm_event_do_notifiers(bContext *C)
|
|||
}
|
||||
}
|
||||
|
||||
MEM_freeN(note);
|
||||
MEM_freeN((void *)note);
|
||||
}
|
||||
#endif /* If 1 (postpone disabling for in favor of message-bus), eventually. */
|
||||
|
||||
|
|
Loading…
Reference in New Issue