keep pan-info-box within screen-boundaries
fixes #5214 git-svn-id: svn://localhost/ardour2/branches/3.0@13728 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e040974bed
commit
54276f7e78
@ -128,13 +128,21 @@ PersistentTooltip::show ()
|
||||
|
||||
set_tip (_tip);
|
||||
|
||||
if (!_window->is_visible ()) {
|
||||
/* move the window a little away from the mouse */
|
||||
int rx, ry;
|
||||
_target->get_window()->get_origin (rx, ry);
|
||||
_window->move (rx, ry + _target->get_height());
|
||||
_window->present ();
|
||||
}
|
||||
if (!_window->is_visible ()) {
|
||||
int rx, ry, sw;
|
||||
sw= gdk_screen_width();
|
||||
_target->get_window()->get_origin (rx, ry);
|
||||
_window->move (rx, ry + _target->get_height());
|
||||
_window->present ();
|
||||
|
||||
/* the window needs to be realized first
|
||||
* for _window->get_width() to be correct.
|
||||
*/
|
||||
if (sw < rx + _window->get_width()) {
|
||||
rx = sw - _window->get_width();
|
||||
_window->move (rx, ry + _target->get_height());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user