summaryrefslogtreecommitdiff
path: root/vcl/win/window/salframe.cxx
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2023-10-25 22:26:14 +0300
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2024-03-04 15:30:22 +0100
commit68f55fc9a1aa8c0f403761e39e7531ae298ea79e (patch)
tree319636661263f4aa37d5173e27eaf184c0a5ffa3 /vcl/win/window/salframe.cxx
parent0b21e2a404c114529376dc50764dc0286dafc745 (diff)
vcl: interface for WinAPI FlashWindow() function
To improve LibreOffice UX it will be great to have possibility to signal user on some event did happen, but without capuring focus and bringing LO to foreground, like it is happenings sometimes. It can be annoying. For example, if dialog window is opening slowly and user did switch to another application, this is used to inform user that there are some updates in LO window: dialog finally alive. There are somewhat confusing implementation of this feature: VCL dialog window became visible and actual Windows window should use ::FlashWindow() are very different in hierarchies, so it is somewhat challenging to find window to flash or even decide shoud we flash window or not. Change-Id: I6ca6706d2dda8902aea273ebe6e318ec9bf4beda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158472 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'vcl/win/window/salframe.cxx')
-rw-r--r--vcl/win/window/salframe.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 81dcf341e60d..ab20e2411e42 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -2993,6 +2993,14 @@ void WinSalFrame::Beep()
MessageBeep( 0 );
}
+void WinSalFrame::FlashWindow() const
+{
+ if (GetForegroundWindow() != mhWnd)
+ {
+ ::FlashWindow(mhWnd, TRUE);
+ }
+}
+
SalFrame::SalPointerState WinSalFrame::GetPointerState()
{
SalPointerState aState;