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).
This commit is contained in:
Ton Roosendaal 2010-11-29 17:10:46 +00:00
parent 7286b7a7ca
commit 01169dd632
3 changed files with 7 additions and 2 deletions

@ -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)

@ -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;
}

@ -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)