Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355106

Summary: Focused TrayItem can be removed using ALT+F4
Product: [Eclipse Project] Platform Reporter: Jelle Raaijmakers <jelle>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Attachments:
Description Flags
Test case none

Description Jelle Raaijmakers CLA 2011-08-18 11:49:11 EDT
Build Identifier: 

When a TrayItem is focused, for example after showing a context menu, a subsequent ALT+F4 will remove the tray icon from the system tray. This happens on Windows 7 64-bit. Please see the attached testcase.

I looked into this problem and found out that messageProc() in TrayItem.java is deliberately setting focus to the hWnd of the tray icon, which in turn receives the ALT+F4.

As far as I know, there is no workaround.

Reproducible: Always

Steps to Reproduce:
1. Add a TrayItem to the system tray
2. Show a context menu on SWT.MenuDetect
3. Press ALT+F4

The tray icon should now disappear.
Comment 1 Jelle Raaijmakers CLA 2011-08-18 11:50:27 EDT
Created attachment 201725 [details]
Test case
Comment 2 Eclipse Genie CLA 2020-01-09 09:12:36 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.