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

Bug 338137

Summary: Invisible but focused controls can be interacted with
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: d_a_carver
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Remy Suen CLA 2011-02-24 13:58:09 EST
I20110218-0831

1. Close all parts in the shared area.
2. Select a file in the 'Package Explorer'.
3. Use Ctrl+M to maximize the shared area.
4. Hit 'Enter'.
5. The selected file opens!
Comment 1 Eric Moffatt CLA 2011-02-24 14:28:24 EST
Remy, this is part of the whole story about what happens to 'activation' when a part / stack / shared area goes minimized (focus follows activation but where does it go when there is no active part ?).

We already have a number of 3.x issues surrounding this (203667, 332018, 295973...) so this is a good place to figure this out for 4.x.

What do you think the active part should be under this scenario ? Where should the focus be if the active part is null ?
Comment 2 Remy Suen CLA 2011-02-24 14:42:47 EST
(In reply to comment #1)
> What do you think the active part should be under this scenario ?

It should be 'null' since there is nothing available in the window.

> Where should
> the focus be if the active part is null ?

Probably on the tab folder of the maximized part stack.
Comment 3 Remy Suen CLA 2011-02-24 16:12:10 EST
For whatever reasons, I can still use the spacebar to depress the button even though it has been reparented to a shell that has never been opened.

Display display = new Display();
final Shell master = new Shell(display, SWT.SHELL_TRIM);
master.setLayout(new FillLayout());
final Shell hidden = new Shell(display, SWT.SHELL_TRIM);
hidden.setLayout(new FillLayout());

final Composite c = new Composite(master, SWT.NONE);
c.setLayout(new FillLayout());
Button b = new Button(c, SWT.PUSH);
b.addListener(SWT.Selection, new Listener() {
  public void handleEvent(Event e) {
    System.out.println("handleEvent");
  }
});

display.timerExec(3000, new Runnable() {
  public void run() {
    c.setParent(hidden);
    hidden.layout(true, true);
    master.layout(true, true);
  }
});

master.pack();
master.open();

while (!master.isDisposed()) {
  if (!display.readAndDispatch())
    display.sleep();
}
display.dispose();
Comment 4 Lars Vogel CLA 2019-09-24 13:58:20 EDT
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.
Comment 5 Eclipse Genie CLA 2022-02-10 14:28:22 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.