From 7f7f3618ddf2e5561dd0450fb949b245a8a2469a Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Sat, 16 Jun 2018 12:06:12 +0000 Subject: [PATCH] webpositive: force download window on screen. * When Download window is initially shown, it is correctly fully onscreen; however, adding a download resizes the window such that it becomes partially offscreen. Now, when the frame is resized, reposition the window onscreen again. Fixes #12704 --- src/apps/webpositive/DownloadWindow.cpp | 7 +++++++ src/apps/webpositive/DownloadWindow.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/apps/webpositive/DownloadWindow.cpp b/src/apps/webpositive/DownloadWindow.cpp index f164b9936c..546fbdd8ed 100644 --- a/src/apps/webpositive/DownloadWindow.cpp +++ b/src/apps/webpositive/DownloadWindow.cpp @@ -223,6 +223,13 @@ DownloadWindow::DispatchMessage(BMessage* message, BHandler* target) } +void +DownloadWindow::FrameResized(float newWidth, float newHeight) +{ + MoveOnScreen(B_DO_NOT_RESIZE_TO_FIT | B_MOVE_IF_PARTIALLY_OFFSCREEN); +} + + void DownloadWindow::MessageReceived(BMessage* message) { diff --git a/src/apps/webpositive/DownloadWindow.h b/src/apps/webpositive/DownloadWindow.h index 3b6dec5a86..28cdeec0d4 100644 --- a/src/apps/webpositive/DownloadWindow.h +++ b/src/apps/webpositive/DownloadWindow.h @@ -26,6 +26,7 @@ public: virtual void DispatchMessage(BMessage* message, BHandler* target); + virtual void FrameResized(float newWidth, float newHeight); virtual void MessageReceived(BMessage* message); virtual bool QuitRequested();