QOwnNotes icon indicating copy to clipboard operation
QOwnNotes copied to clipboard

Tray icon context menu behavior

Open truthsword opened this issue 6 years ago • 6 comments

Expected behavior

  1. The tray icon's right-click context menu should close when a. a "Recent note" is selected b. the active folder is changed

  2. When a recent note is selected from the tray icon's context menu, the program window should open, and the selected note is active in the program window

Actual behavior

A small thing I noticed, is when a select a note folder, the context menu (from right-clicking the tray icon) does not auto-close (disappear) until I click elsewhere on the screen (Win10 x64).

This is what remains behind

Upon further investigation, I noticed the following behavior with the tray icon...

  1. When I select a recent note, and the program is minimized, it opens the program window but does not display the note I selected. However, the tray context menu goes away.

  2. When I select a recent note, and the program window is open, the program window does not display the note I selected, and the tray context menu remains as appears when initially right-clicked.

  1. When I change the active folder, and the program is minimized, the program remains minimized, and the tray context menu remains as appears when right-clicked.

  1. When I change the active folder, and the program window is open, the program window changes the active folder I selected, and the tray context menu remains as appears when right-clicked.

Information about the application, settings and environment

Expand

QOwnNotes Debug Information

General Info

Current Date: Mon Nov 25 10:58:56 2019 Version: 19.11.23 Build date: Nov 23 2019 Build number: 4983 Platform: windows Operating System: Windows 10 (10.0) Build architecture: i386 Current architecture: x86_64 Release: AppVeyor Qt Version (build): 5.13.2 Qt Version (runtime): 5.13.2 Portable mode: no

truthsword avatar Nov 29 '19 23:11 truthsword

When I select a recent note, and the program is minimized, it opens the program window but does not display the note I selected. However, the tray context menu goes away.

When I select a recent note, and the program window is open, the program window does not display the note I selected, and the tray context menu remains as appears when initially right-clicked.

Confirmed. Note switching doesn't happen. This is an easy fix.

The rest I haven't been able to try since I haven't pulled the latest changes in yet.

System tray menu always closes itself after the action for me on Linux

Waqar144 avatar Nov 30 '19 05:11 Waqar144

System tray menu always closes itself after the action for me on Linux

This is Win10x64-1903

truthsword avatar Nov 30 '19 16:11 truthsword

Will fix note switching by tomorrow.

Don't know about the context menu behavior. This is something that should be done by Qt automatically.

Waqar144 avatar Dec 02 '19 18:12 Waqar144

19.12.1

  • fixed notes not switching from system tray menu (for #1467, thank you @Waqar144)

pbek avatar Dec 03 '19 17:12 pbek

There now is a new release, could you please test it and report if it works for you?

pbek avatar Dec 03 '19 17:12 pbek

That part works... selecting a recent note loads the recent note. However, using the tray context menu when QON is open, leaves the context window visible/active. If I switch folders while QON is open, not only does the context window remain open, but often, neither the context window or the QON window are active. See here that no note is highlighted... Clicking anywhere on these two doesn't make them active. When this happens, although the selected folder appears in the QON window, no note is selected/displayed, and clicking on a note often has no effect. To regain control, I must Ctrl-Tab to restore QON as the active window.

So the lesson is... don't use the tray context menu when the QON window is active.

truthsword avatar Dec 03 '19 18:12 truthsword