Home » Eclipse Projects » Rich Client Platform (RCP) » Loss of Mouse events and OBSCURED widgets
Loss of Mouse events and OBSCURED widgets [message #489296] |
Fri, 02 October 2009 05:45  |
Eclipse User |
|
|
|
Hi all,
I'm currently developing an RCP application (Eclipse 3.4.1 on Linux Redhat 5).
Basically, I need a view that contains a grid of buttons (let's say 4 rows x 6 columns).
These buttons need to be big, flat and with a solid color.
They are created at the begining and never destroyed.
Each time the user clicks on a button, the whole grid is repainted and the buttons can have a different color, visibilty and or text.
Problem: after up to 1h30, the buttons are slowly dying one after the others... They no more receive any mouse event.
In debug mode, I have seen that the Display#runDeferredEvents does not receive any event when the mouse is over them.
The widget that is related to the button has its state sets to SWT.OBSCURED.
At the begining, I used a "custom" button built on a Composite (SWT.BORDER) with a child label (SWT.CENTER) and a mouse listener.
==> The problem appears after 30 min
I have seen in the doc that the SWT.CENTER flag may cause an OBSCURED state under Linux.
Thus, I have removed all the Labels and now, I draw the text (thanks to a PaintListener)
==> The problem appears after 1h / 1h30
I have replaced the Composite by a Canvas: same result
I have replaced the Canvas by a real SWT button: same result
Finally, I have removed all the buttons and replaced them by a single Canvas on which I paint all the buttons by myself.
==> it seems to works 
... but unfortunately, I have another view that contains a button, a table and labels... and sometimes the problem occurs 
... and I can't redraw by hand the whole application!!!
So, can anybody help me???
Thanks!!
|
|
|
Re: Loss of Mouse events and OBSCURED widgets [message #489706 is a reply to message #489296] |
Mon, 05 October 2009 11:34   |
Eclipse User |
|
|
|
Hi,
I have not heard of a problem like this before. When you say the whole grid
is repainted, do you just mean you invoke
setForeground()/setVisible()/setText() on some/all of the Buttons? The
symptoms give the impression of running out of memory, so maybe there's a
leak in swt? Are you able to provide a snippet based on your app that shows
the problem happening (ideal template:
http://www.eclipse.org/swt/faq.php#whatisasnippet )? Also, are you able to
try with eclipse 3.5.1 (
http://download.eclipse.org/eclipse/downloads/drops/R-3.5.1- 200909170800/index.php )
?
Grant
"Thomas SZADEL" <thomas.szadel@atosorigin.com> wrote in message
news:ha4i3h$7tj$1@build.eclipse.org...
> Hi all,
>
> I'm currently developing an RCP application (Eclipse 3.4.1 on Linux Redhat
5).
>
> Basically, I need a view that contains a grid of buttons (let's say 4 rows
x 6 columns).
> These buttons need to be big, flat and with a solid color.
> They are created at the begining and never destroyed.
> Each time the user clicks on a button, the whole grid is repainted and the
buttons can have a different color, visibilty and or text.
>
> Problem: after up to 1h30, the buttons are slowly dying one after the
others... They no more receive any mouse event.
>
> In debug mode, I have seen that the Display#runDeferredEvents does not
receive any event when the mouse is over them.
> The widget that is related to the button has its state sets to
SWT.OBSCURED.
>
> At the begining, I used a "custom" button built on a Composite
(SWT.BORDER) with a child label (SWT.CENTER) and a mouse listener.
> ==> The problem appears after 30 min
>
> I have seen in the doc that the SWT.CENTER flag may cause an OBSCURED
state under Linux.
> Thus, I have removed all the Labels and now, I draw the text (thanks to a
PaintListener)
> ==> The problem appears after 1h / 1h30
>
> I have replaced the Composite by a Canvas: same result
> I have replaced the Canvas by a real SWT button: same result
>
> Finally, I have removed all the buttons and replaced them by a single
Canvas on which I paint all the buttons by myself.
> ==> it seems to works :)
>
> .. but unfortunately, I have another view that contains a button, a table
and labels... and sometimes the problem occurs :(
>
> .. and I can't redraw by hand the whole application!!!
>
> So, can anybody help me???
>
> Thanks!!
|
|
| | | |
Re: Loss of Mouse events and OBSCURED widgets [message #489961 is a reply to message #489922] |
Tue, 06 October 2009 11:50  |
Eclipse User |
|
|
|
Substituting motif should work since it's a totally different code base.
Don't worry about the *testing only* comment, it's > 99% identical to swt's
AIX and HPUX implementations. Just worry about the ugliness ;-).
Back to the GTK problem, if they still see the problem when using Gnome then
try to make a snippet (ideal template:
http://www.eclipse.org/swt/faq.php#whatisasnippet ) that makes the problem
happen for them, and log a report with SWT (
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT ).
There are RHEL5 installs available here to try this on.
Grant
"Thomas SZADEL" <thomas.szadel@atosorigin.com> wrote in message
news:hafio9$m07$1@build.eclipse.org...
> Grant Gayed wrote
> > Perhaps, or related to the gtk version. Are they able to try on their
same machine with a more standard window manager?
> I have asked them to try with Gnome... test is in progress :)
>
> Grant Gayed wrote
> > Do you have access to a RHEL5 install?
> No, I don't. That's their usual installation... and I don't think they
are ready to change!
>
> Now, I'm trying to rebuild the application with swt-motif (I know, it is a
*testing version only*...)... hope it will work :?
|
|
|
Goto Forum:
Current Time: Tue Jul 22 18:53:41 EDT 2025
Powered by FUDForum. Page generated in 0.48514 seconds
|