Page 1 of 1

Buttons respond 1 out of 3 times w/ SDL and OpenGL

Posted: Fri Aug 03, 2007 20:41
by Ralith
Subject gives a basic description of the issue; for all Button objects, defined as below:

Code: Select all

<Window Type="TaharezLook/Button" Name="ExitButton">
  <Property Name="UnifiedPosition" Value="{{0.55,0},{0.60,0}}" />
  <Property Name="UnifiedSize" Value="{{0,50},{0,30}}" />
  <Property Name="Text" Value="Exit" />
</Window>

the button only reacts to a press of mouse button 1 while the pointer is over it every third time. Other widgets, such as the spinner, appear to behave correctly, and respond as expected to all input. I've confirmed this behavior by rebuilding and running on three different systems.

Also, as a side issue, is there any way to get buttons to automatically scale their width to accommodate the text they contain?

Posted: Wed Sep 05, 2007 22:42
by balizeiro
Did you find any solution to your problem?
Because sometimes I need to press the buttons 2 or 3 times to make them work.
Maybe some bug? :?

Posted: Thu Sep 06, 2007 09:10
by ilveroluca
I'm having the same problem. The button generates single, double, and triple click events, even though the mouse clicks are seconds apart.

click 1 - EventClicked
click 2 - EventMouseDoubleClick
click 3 - EventMouseTripleClick
click 4 - EventClicked
click 5 - EventMouseDoubleClick
click 6 - EventMouseTripleClick
click 7 - EventClicked
...

My mouse events are being injected properly. I'm suspecting a problem related to the double/triple click timeout. I'm injecting a time pulse every 1/30s, although looking at the code it doesn't look like that that time is used to measure the distance in time between clicks. Suggestions?

Posted: Thu Sep 06, 2007 09:58
by ilveroluca
I've tracked it down to an erroneous use of clock() in class SimpleTimer in CEGUISystem.cpp. I'll file a bug report. In the meantime, a work-around might be to set wantsMultiClickEvents to false. Is there a way to make this property default to false?

Posted: Thu Sep 06, 2007 10:11
by ilveroluca
Filed a bug report for this issue: http://www.cegui.org.uk/mantis/view.php?id=153