Do bounds-checking on more windows (#4797)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -26,4 +26,14 @@ enum class BoundsChecking {
|
||||
void moveWindowTo(QWidget *window, QPoint position,
|
||||
BoundsChecking mode = BoundsChecking::DesiredPosition);
|
||||
|
||||
/// Moves the `window` to the (global) `position`
|
||||
/// while doing bounds-checking according to `mode` to ensure the window stays on one screen.
|
||||
/// Will also call show on the `window`, order is dependant on platform.
|
||||
///
|
||||
/// @param window The window to move.
|
||||
/// @param position The global position to move the window to.
|
||||
/// @param mode The desired bounds checking.
|
||||
void showAndMoveWindowTo(QWidget *window, QPoint position,
|
||||
BoundsChecking mode = BoundsChecking::DesiredPosition);
|
||||
|
||||
} // namespace chatterino::widgets
|
||||
|
||||
Reference in New Issue
Block a user