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:
-rw-r--r--source/blender/editors/include/UI_interface.h1
-rw-r--r--source/blender/editors/interface/interface_handlers.c5
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c5
3 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index a602fd27222..e64a5a4af57 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -687,6 +687,7 @@ void uiScalePanels(struct ARegion *ar, float new_width);
void UI_add_region_handlers(struct ListBase *handlers);
void UI_add_popup_handlers(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *popup);
void UI_remove_popup_handlers(struct ListBase *handlers, uiPopupBlockHandle *popup);
+void UI_remove_popup_handlers_all(struct bContext *C, struct ListBase *handlers);
/* Module
*
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index c5211fe9dd7..22880d8e79c 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -7662,6 +7662,11 @@ void UI_remove_popup_handlers(ListBase *handlers, uiPopupBlockHandle *popup)
WM_event_remove_ui_handler(handlers, ui_handler_popup, ui_handler_remove_popup, popup, FALSE);
}
+void UI_remove_popup_handlers_all(bContext *C, ListBase *handlers)
+{
+ WM_event_free_ui_handler_all(C, handlers, ui_handler_popup, ui_handler_remove_popup);
+}
+
bool UI_textbutton_activate_event(const bContext *C, ARegion *ar,
const void *rna_poin_data, const char *rna_prop_id)
{
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 91b7b81940b..de961afefd8 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -247,7 +247,10 @@ void wm_event_do_notifiers(bContext *C)
if (note->window == win) {
if (note->category == NC_SCREEN) {
if (note->data == ND_SCREENBROWSE) {
- /* do not free handlers here! [#35434] */
+ /* free popup handlers only [#35434] */
+ wmWindow *win = CTX_wm_window(C);
+ UI_remove_popup_handlers_all(C, &win->modalhandlers);
+
ED_screen_set(C, note->reference); // XXX hrms, think this over!
if (G.debug & G_DEBUG_EVENTS)