Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Double click activates other app?
Double click activates other app? [message #449525] Tue, 25 January 2005 18:08 Go to next message
Eclipse UserFriend
Originally posted by: fangsh.appliedbiosystems.com

Hi,
I am developing a Windows application with RCP architecture on Eclipse
3.0+. We have views that are supposed to react to double click actions.
However, the double click event sometimes activates another application
that sits in the background. I understand this might be a windows
"feature" from the Eclipse source code comments:

* Feature in Windows. When multiple shells are
* disabled and one of the shells has an enabled
* dialog child and the user selects a disabled
* shell that does not have the enabled dialog
* child using the Task bar, Windows brings the
* disabled shell to the front. As soon as the
* user clicks on the disabled shell, the enabled
* dialog child comes to the front. This behavior
* is unspecified and seems strange. Normally, a
* disabled shell is frozen on the screen and the
* user cannot change the z-order by clicking with
* the mouse. The fix is to look for WM_ACTIVATEAPP
* and force the enabled dialog child to the front.
* This is typically what the user is expecting.


I tried, after the mouse down event, calling
OS.SetActiveWindow(parent.getShell().handle);
parent.getShell().forceActive();
it didn't work.

I tried,
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
OS.SetWindowPos(parent.getShell().handle,
OS.HWND_TOPMOST, 0, 0, 0, 0,flags);


*
Re: Double click activates other app? [message #449526 is a reply to message #449525] Tue, 25 January 2005 18:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fangsh.appliedbiosystems.com

Sylvia wrote:

> Hi,
> I am developing a Windows application with RCP architecture on Eclipse
> 3.0+. We have views that are supposed to react to double click actions.
> However, the double click event sometimes activates another application
> that sits in the background. I understand this might be a windows
> "feature" from the Eclipse source code comments:

> * Feature in Windows. When multiple shells are
> * disabled and one of the shells has an enabled
> * dialog child and the user selects a disabled
> * shell that does not have the enabled dialog
> * child using the Task bar, Windows brings the
> * disabled shell to the front. As soon as the
> * user clicks on the disabled shell, the enabled
> * dialog child comes to the front. This behavior
> * is unspecified and seems strange. Normally, a
> * disabled shell is frozen on the screen and the
> * user cannot change the z-order by clicking with
> * the mouse. The fix is to look for WM_ACTIVATEAPP
> * and force the enabled dialog child to the front.
> * This is typically what the user is expecting.


> I tried, after the mouse down event, calling
> OS.SetActiveWindow(parent.getShell().handle);
> parent.getShell().forceActive();
> it didn't work.

> I tried,
> int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
> OS.SetWindowPos(parent.getShell().handle,
> OS.HWND_TOPMOST, 0, 0, 0, 0,flags);


>
but it has the side effect that the application now stays on the
foreground even when it deactivates.
What's the proper way to fix this issue? since I don't see it with Eclipse
IDE, There must be something I missed.
Re: Double click activates other app? [message #449708 is a reply to message #449526] Fri, 28 January 2005 00:47 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The proper way is to enter a bug report with a stand alone snippet that
shows the problem. Without this, we have no idea if the work around that
you are quoting is even causing your problem. If we change code, we have no
idea if the code changes fix your problem.

"Sylvia" <fangsh@appliedbiosystems.com> wrote in message
news:ct624h$pgc$1@www.eclipse.org...
> Sylvia wrote:
>
> > Hi,
> > I am developing a Windows application with RCP architecture on Eclipse
> > 3.0+. We have views that are supposed to react to double click actions.
> > However, the double click event sometimes activates another application
> > that sits in the background. I understand this might be a windows
> > "feature" from the Eclipse source code comments:
>
> > * Feature in Windows. When multiple shells are
> > * disabled and one of the shells has an enabled
> > * dialog child and the user selects a disabled
> > * shell that does not have the enabled dialog
> > * child using the Task bar, Windows brings the
> > * disabled shell to the front. As soon as the
> > * user clicks on the disabled shell, the enabled
> > * dialog child comes to the front. This behavior
> > * is unspecified and seems strange. Normally, a
> > * disabled shell is frozen on the screen and the
> > * user cannot change the z-order by clicking with
> > * the mouse. The fix is to look for WM_ACTIVATEAPP
> > * and force the enabled dialog child to the front.
> > * This is typically what the user is expecting.
>
>
> > I tried, after the mouse down event, calling
> > OS.SetActiveWindow(parent.getShell().handle);
> > parent.getShell().forceActive();
> > it didn't work.
>
> > I tried,
> > int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
> > OS.SetWindowPos(parent.getShell().handle,
> > OS.HWND_TOPMOST, 0, 0, 0, 0,flags);
>
>
> >
> but it has the side effect that the application now stays on the
> foreground even when it deactivates.
> What's the proper way to fix this issue? since I don't see it with Eclipse
> IDE, There must be something I missed.
>
>
Previous Topic:Shortcuts in SWT? (accelerators)
Next Topic:Button with multi-line text ...
Goto Forum:
  


Current Time: Sat Apr 20 01:59:22 GMT 2024

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

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

Back to the top