Bug 431219 - No busy cursor from menu item action
Summary: No busy cursor from menu item action
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.3   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-03-26 07:03 EDT by pawcik CLA
Modified: 2021-04-08 15:53 EDT (History)
4 users (show)

See Also:


Attachments
BusyIndicator test snippet (2.01 KB, text/x-java)
2014-03-26 07:03 EDT, pawcik CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description pawcik CLA 2014-03-26 07:03:26 EDT
Created attachment 241262 [details]
BusyIndicator test snippet

BusyIndicator doesn't show the wait cursor when started from SelectionListener on MenuItem for gtk2+.

Platform: Linux (Arch linux)
Tested with: gtk 2.24.22 and gtk 3.10.7 and swt version (both 4.3 and 4.2.2).

The snippets to test it (see attached code for complete listing):

        MenuItem busy = new MenuItem(dropdown, SWT.PUSH);
        busy.setText("Busy");
        busy.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                //cursor dosn't change for shell
                BusyIndicator.showWhile(Display.getDefault(), new LongOperation());
            }
        });
        Button b = new Button(shell, SWT.PUSH);
        b.setText("Test");
        b.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                //work as desire
                BusyIndicator.showWhile(Display.getDefault(), new LongOperation());
            }

        });

Pressing the "Test" button will change cursor to wait.
Pressing the menu action "Busy" doesn't change the cursor to wait.


The same snippet was tested on windows platform (windows 7) and for both cases the busy cursor is visible during 'LongOperation'.

There is similar bug #6325 resolved at 2004, for windows platform.

Is it possible to make it consistent with gtk ?
Comment 1 pawcik CLA 2014-03-26 07:07:56 EDT
My current workaround is: execute BusyIndicator in Display.asyncExec();

       busy.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                Display.getDefault().asyncExec(new Runnable() {

                    @Override
                    public void run() {
                        BusyIndicator.showWhile(Display.getDefault(), new LongOperation());
                    }
                });
            }
        });
Comment 2 Eric Williams CLA 2018-05-11 14:15:50 EDT
Reproducible on 4.8 M7 with GTK3.22 and Fedora 28.
Comment 3 Eclipse Genie CLA 2018-06-07 09:31:01 EDT
New Gerrit change created: https://git.eclipse.org/r/124198
Comment 4 Eclipse Genie CLA 2021-04-08 15:53:42 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. 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.