• Mike Kaganski's avatar
    tdf#49134 tdf#114466 Transfer privilege to become foreground process · 8d1d82dd
    Mike Kaganski yazdı
    ... 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
    https://technet.microsoft.com/en-us/library/cc957208). 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
    https://msdn.microsoft.com/en-us/library/ms632668) 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: https://gerrit.libreoffice.org/48839Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
    Tested-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
    8d1d82dd
Adı
Son kayıt (commit)
Son güncelleme
..
android Loading commit data...
cppunittester Loading commit data...
inc Loading commit data...
osl Loading commit data...
qa Loading commit data...
rtl Loading commit data...
test Loading commit data...
textenc Loading commit data...
util Loading commit data...
CppunitTest_Module_DLL.mk Loading commit data...
CppunitTest_sal_osl.mk Loading commit data...
CppunitTest_sal_osl_security.mk Loading commit data...
CppunitTest_sal_rtl.mk Loading commit data...
CppunitTest_sal_types.mk Loading commit data...
Executable_cppunittester.mk Loading commit data...
Executable_osl_process_child.mk Loading commit data...
Library_lo-bootstrap.mk Loading commit data...
Library_sal.mk Loading commit data...
Library_sal_textenc.mk Loading commit data...
Makefile Loading commit data...
Module_sal.mk Loading commit data...
README Loading commit data...