Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Toolbar Get / Lost Focus events handles different from SWT
Toolbar Get / Lost Focus events handles different from SWT [message #1767753] Mon, 10 July 2017 16:12 Go to next message
Nicola Zanaga is currently offline Nicola ZanagaFriend
Messages: 56
Registered: July 2009
Member
I found problems with focus event in toolbar.

When using toolbar with "SWT.NO_FOCUS" option I expect a mouse click on toolbar doesn't generate any lost / get event.

In the snippet below, clicking first on text box, and after on toolbar, generate a lost focus for text box and a get focus for the underlying shell.
In swt doesn't generate events.

This is similar to another question related to bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=499085

        FocusListener focusListener = new FocusListener() {
            @Override
            public void focusLost(FocusEvent event) {
                System.out.println("lost focus " + event.widget);
            }

            @Override
            public void focusGained(FocusEvent event) {
                System.out.println("get focus " + event.widget);
            }
        };

        Shell s = new Shell();
        s.addFocusListener(focusListener);

        Composite c = new Composite(s, SWT.NONE);
        c.setBounds(0, 0, 400, 500);
        c.addFocusListener(focusListener);

        Text t = new Text(c, SWT.BORDER);
        t.setBounds(0, 0, 400, 400);
        t.addFocusListener(focusListener);

        ToolBar b = new ToolBar(c, SWT.FLAT | SWT.NO_FOCUS);
        b.setBounds(0, 400, 400, 100);
        ToolItem ti = new ToolItem(b, SWT.NONE);
        ti.setImage(Display.getDefault().getSystemImage(SWT.ICON_INFORMATION));
        b.addFocusListener(focusListener);

        s.open();
Re: Toolbar Get / Lost Focus events handles different from SWT [message #1767791 is a reply to message #1767753] Tue, 11 July 2017 07:30 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Nicola,
please open a bugzilla and attach this snippet there. We will track the progress on the issue there.
Regards,
Ivan
Re: Toolbar Get / Lost Focus events handles different from SWT [message #1767829 is a reply to message #1767791] Tue, 11 July 2017 12:45 Go to previous messageGo to next message
Nicola Zanaga is currently offline Nicola ZanagaFriend
Messages: 56
Registered: July 2009
Member
Submitted bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=519499
Re: Toolbar Get / Lost Focus events handles different from SWT [message #1780425 is a reply to message #1767829] Mon, 22 January 2018 10:44 Go to previous messageGo to next message
Nicola Zanaga is currently offline Nicola ZanagaFriend
Messages: 56
Registered: July 2009
Member
Hi,

any news about this bug ?

https://bugs.eclipse.org/bugs/show_bug.cgi?id=519499
Re: Toolbar Get / Lost Focus events handles different from SWT [message #1781005 is a reply to message #1780425] Wed, 31 January 2018 12:31 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
I'll have a look on it soon.
Regards,
Ivan
Previous Topic:javascript: cannot access parent window
Next Topic:Deploying E4 application to a servlet container using tycho
Goto Forum:
  


Current Time: Thu Mar 28 11:55:27 GMT 2024

Powered by FUDForum. Page generated in 0.03683 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top