From 01169dd63203e0080796c45f464dbcb92d427280 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 29 Nov 2010 17:10:46 +0000 Subject: Bugfix #24971 Outliner: if bottom slider was hidden, you still could not click there on items. Code was using region-mask to clip input, but the mask is not adjusted for sliders now (keeps view same). --- source/blender/editors/interface/view2d.c | 4 ++++ source/blender/editors/interface/view2d_ops.c | 2 +- source/blender/editors/space_outliner/space_outliner.c | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 43d4e20b8bb..d9e6044ab53 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -57,6 +57,9 @@ /* *********************************************************************** */ +/* XXX still unresolved: scrolls hide/unhide vs region mask handling */ +/* XXX there's V2D_SCROLL_HORIZONTAL_HIDE and V2D_SCROLL_HORIZONTAL_FULLR ... */ + /* helper to allow scrollbars to dynamically hide * - returns a copy of the scrollbar settings with the flags to display * horizontal/vertical scrollbars removed @@ -83,6 +86,7 @@ static void view2d_masks(View2D *v2d) v2d->mask.ymax= v2d->winy - 1; #if 0 + // XXX see above v2d->scroll &= ~(V2D_SCROLL_HORIZONTAL_HIDE|V2D_SCROLL_VERTICAL_HIDE); /* check size if: */ if (v2d->scroll & V2D_SCROLL_HORIZONTAL) diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index f59e7ddda4b..6be2a018b71 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1503,7 +1503,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) scroller_activate_exit(C, op); /* can't catch this event for ourselves, so let it go to someone else? */ - // FIXME: still this doesn't fall through to the item_activate callback for the outliner... + /* XXX note: if handlers use mask rect to clip input, input will fail for this case */ return OPERATOR_PASS_THROUGH; } diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index f31910d8289..8bb49b85271 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -60,7 +60,8 @@ static void outliner_main_area_init(wmWindowManager *wm, ARegion *ar) /* own keymap */ keymap= WM_keymap_find(wm->defaultconf, "Outliner", SPACE_OUTLINER, 0); - WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); + /* don't pass on view2d mask, it's always set with scrollbar space, hide fails */ + WM_event_add_keymap_handler_bb(&ar->handlers, keymap, NULL, &ar->winrct); } static void outliner_main_area_draw(const bContext *C, ARegion *ar) -- cgit v1.2.3