summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Enable closing the system tray menu when clicking outside of itAndy Shaw2020-02-271-1/+5
| | | | | | | | | | In order for the system to close a menu when clicking outside of it or outside of the controlling window for the system tray then it needs to be at the foreground right before the menu is tracked. This makes it act like other system tray menus then. Change-Id: I663670c506cfd1e2ba59cd3e75b12e1f8ba17c33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix tray geometry not updatingFriedemann Kleint2019-12-051-0/+4
| | | | | | | | | | | | The application does not update its screens when there are no windows on which a WM_DPICHANGE could be received. Add a check for it to the tray window procedure and trigger an update from there if no top levels are present. Fixes: QTBUG-79248 Change-Id: I0b1c4db560662ecf2b473304942da373be6fdc73 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Quit application when QWindowsSystemTrayIcon receives WM_CLOSEJan Niklas Hasse2019-12-051-1/+5
| | | | | | | | | | | | When an application only has a trayicon and is killed by `taskkill /IM binary.exe` the trayicon's HWND will receive a WM_CLOSE message. If we don't handle this, the tray icon will close anyway, but the app still runs in the task manager. Fixes: QTBUG-43855 Change-Id: I5f82a068df9c40360bd565a2681e1b37ff114e44 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix clang warnings about using typedefFriedemann Kleint2019-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Replace by using (except for function pointers). Change-Id: I0dfe03c22f9f87155003d13a6376381623df7217 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows/Direct2d QPA: Use nullptrFriedemann Kleint2019-01-281-2/+3
| | | | | Change-Id: I6ce01caa58de78e0eb61e243ee1e7b05cc1f5568 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Move the code installing the filter for WM_TASKBARCREATEDFriedemann Kleint2019-01-241-6/+7
| | | | | | | | | | Previously, the code was in the constructor, where hwnd was 0 and ChangeWindowMessageFilterEx() failed. Move it into QWindowsSystemTrayIcon::ensureInstalled() after the creation of the message window. Change-Id: Iff4c6d6d6b11bdcace7514ad421c96c94e52bbba Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Fix tray icon becoming visible before showFriedemann Kleint2019-01-241-1/+25
| | | | | | | | | Use the NIS_HIDDEN flag of the NOTIFYICONDATA structure to prevent it from becoming visible before show when calling NIM_ADD with the icon data. Fixes: QTBUG-73185 Change-Id: If5cc5a4930a889623a5cac84138185ad04765ece Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Fix crash showing QSystemTrayIcon's context menu with ↵Friedemann Kleint2018-11-091-5/+13
| | | | | | | | | | | | PROCESS_DPI_UNAWARE The coordinates of the WM_CONTEXT message may be out of any screen in PROCESS_DPI_UNAWARE mode since hi-res coordinates are delivered in this case (Windows issue). Default to primary screen with check to prevent a crash. Fixes: QTBUG-67966 Change-Id: I1950360520e93cbf3509611b3057635769f6543a Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-091-1/+1
| | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
* Native Windows file dialog: Observe Windows Explorer "Show hidden files" settingFriedemann Kleint2017-06-131-15/+2
| | | | | | | | | | Extract a helper function to read the setting and use that in file dialogs and tray icon. Task-number: QTBUG-60593 Change-Id: I03cf1e45611690a128bf2cc17eba5dff23b86969 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Windows QPA: Move system tray icon implementation into the pluginFriedemann Kleint2017-04-271-0/+456
The system tray icon implementation relied on QMenu. After the introduction of QPlatformSystemTrayIcon::contextMenuRequested(), the code can be moved into the plugin, making use of native menus when enabled or falling back to QMenu. This enables the SystemTrayIcon QML Type to work. [ChangeLog][QtGui][Windows] A native system tray icon is now available for SystemTrayIcon. Change-Id: I0fdbfb5cbb815c1ea6fb19305a9bceb9c5bcc034 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>