diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-10-12 15:43:45 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-10-12 15:50:18 +0300 |
commit | 3b4f6996a8fd521b532eff0f8cbcd282d9a2c5b7 (patch) | |
tree | af95c1c43bdbbd72a42dfee2b18cd4d326cd15db /source/blender/editors/include | |
parent | b29e37ed81fdc4e6213602ca5a9d5095100ee513 (diff) |
Fix T52999: floating (popup) panels/menus could jump around screen in some cases.
Would happen during panel's refresh drawing, if drawing code had to adjust
final panel position compared to the initial one computed based on the
mouse coordinates, and user had dragged the floating panel around.
Issue fixed by adjusting stored mouse coordinates once final panel
position is known, such that they would directly generate those
coordinates. that way, the basic offset applied to those stored mouse
coordinates during panel dragging is valid, and recreating panel based
on those won't make it jump in screen.
Note that panel will still jump in case user dragged it partially out of
view - we could prevent that, but imho it's better to keep that
behavior, since redraw can generate a popup of different size, which
could end up with a totally out-of-view one...
Hopefully this fix does not break anything else!
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index e14a3a3ff0a..890fe720991 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -439,7 +439,7 @@ void UI_popup_block_close(struct bContext *C, struct wmWindow *win, uiBlock *blo * */ uiBlock *UI_block_begin(const struct bContext *C, struct ARegion *region, const char *name, short dt); -void UI_block_end_ex(const struct bContext *C, uiBlock *block, const int xy[2]); +void UI_block_end_ex(const struct bContext *C, uiBlock *block, const int xy[2], int r_xy[2]); void UI_block_end(const struct bContext *C, uiBlock *block); void UI_block_draw(const struct bContext *C, struct uiBlock *block); void UI_block_update_from_old(const struct bContext *C, struct uiBlock *block); |