path: root/vcl/source/window/dialog.cxx
diff options
authorMike Kaganski <>2018-01-29 16:24:24 +0300
committerAndras Timar <>2018-01-29 22:03:00 +0100
commit461ef62f514a5e7c88e5087cffda88d9535cef16 (patch)
tree47b03cdcf386ddefa4ee402c3f413c0918834060 /vcl/source/window/dialog.cxx
parent5ef05e2b54983a3937c0ecae09ef5808117596b1 (diff)
tdf#49134 tdf#114466 Transfer privilege to become foreground process
... to already open soffice process from newly spawned one on Windows. When an application takes user input, a timeout is started during which other processes cannot create foreground windows that might steal focus, and thus interrupt user input. The timeout is defined by SPI_SETFOREGROUNDLOCKTIMEOUT (see SystemParametersInfo) and ForegroundLockTimeout registry setting (see If an application that currently doesn't have right to become foreground tries to show popups in this interval, the popup will stay on background, and only flash in taskbar. The application that has the right to steal focus (see the list in may transfer its right to another process using AllowSetForegroundWindow function. So, the intended effect is this: 1. User interacts with some foreground process (e.g., Explorer); a timeout is started to prevent non-privileged processes from stealing focus; 2. As the result, the process launches a new soffice process, which has privilege to create foreground windows (as it is started by foreground process); 3. It communicates with already started soffice process, which is currently in background, and so doesn't have privilege to create foreground windows until timeout expires; 4. It transfers its right to the already started soffice process, and then issues the required commands that might lead to need to show popup windows. Change-Id: I4208665c2ae4106fa06e72269f4c3804af40d582 Reviewed-on: Reviewed-by: Andras Timar <> Tested-by: Andras Timar <>
Diffstat (limited to 'vcl/source/window/dialog.cxx')
0 files changed, 0 insertions, 0 deletions