gtkD: events being triggered twice
FoxyBrown via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Aug 6 12:27:15 PDT 2017
On Sunday, 6 August 2017 at 18:26:20 UTC, Mike Wey wrote:
> On 06-08-17 16:58, FoxyBrown wrote:
>> I don't really(my code is a bit more complex) but basically
>> all it boils down to is a UI with some nested widgets (an
>> overlay, an box, and a box and one contains the eventbox which
>> I added those callbacks on.
>>
>> I think that something like
>>
>> https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestWindow.d
>>
>>
>> should probably work by just adding an eventbox somewhere and
>> adding that code above.
>>
>> If it doesn't exhibit the same behavior then it has something
>> to do with my project and I could try to reduce it to a
>> minimal example.
>>
> To test i put the label that is on the label page in an event
> box but that doesn't reproduce the issue. I get just a single
> event on enter and a single event on leave.
Ok, I will try to work on figuring out what is going and and
potentially reduce to a test case. It might be on my end. I'm
pretty sure I'm not adding
You might try a separator though in the event box and might try
to add it handling various events(maybe even other events for the
event box)... things related to the mouse.
Here's the glade code for the event box I'm using
<object class="GtkEventBox" id="MainSeparator">
<property name="height_request">5</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="above_child">True</property>
<child>
<object class="GtkSeparator">
<property name="height_request">5</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="events"/>
<property
name="orientation">vertical</property>
</object>
</child>
</object>
Try that when you get some time and see if that changes anything.
If it doesn't then it's surely in my code or in the gtk version
I'm using(still using msys, I'll update to what you released to
see if that fixes it). At least we can narrow it down a little...
More information about the Digitalmars-d-learn
mailing list