|
Roadmap |
Site sponsored by
IGEL
|
||
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [directfb-dev] event handler for DFBtk
Hi,
I am trying to implement envent handler for the DFBtk project. What I want to do is attach an event buffer to each windows and then launch a thread who checks an handle all events that occur in that specific window.
When I try something simple like that :
while(main_loop)
{
DFBWindowEvent evt;
buffer->WaitForEventWithTimeout(buffer, 0, 10 );
while (buffer->GetEvent(buffer, DFB_EVENT(&evt) ) == DFB_OK)
{
switch (evt.type)
{
case DWET_BUTTONDOWN:
if(!clicked && evt.button == DIBI_LEFT)
{
printf("clicked\n");
}
break;
}
}
}
in the thread, and I create several windows, it totally freezes my pc; I merely recover with sysrq:)
The buffer has been created with window->CreateEventBuffer for each windows.
So can I do something like that ? Do I have to use something else ?
--
Info: To unsubscribe send a mail to ecartis@directfb.org with
"unsubscribe directfb-dev" as subject.
|
|
| directfb.org |
|
Development |
|
Old Archives |