Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Touchscreen on raspberry: problem with events
Re: Touchscreen on raspberry: problem with events [message #48633 is a reply to message #48632] Thu, 10 August 2017 14:17 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

For the next time - please write the events separate. Current version is hard to read, because you need to think when event starts and ends.

I do not think the event inside meters so much, we have the correct event order (GDK_BUTTON_PRESS and GDK_BUTTON_RELEASE) when user touch. All we need to know is they are handle correctly. You need to check Switch control code to make sure they are propagate correctly. You could also log the all switch events that happens for example:
void Switch::MouseMove(Point p, dword keyflags) {
    Cout() << "Switch::MouseMove(): "; 
    ...
}

// Add log for the rest of events and try to understand the logic...
void Switch::LeftDown(Point p, dword keyflags) { ... }
void Switch::LeftUp(Point p, dword keyflags) { ... }
void Switch::MouseLeave() { ... }


In my opinion " pushindex = -1;" when mouse leave the area could be a problem. This is the highly probably, because tap can move mouse somewhere else and leave the switch area. Please check this clue - you will need to play with Switch event handling a little bit.

For logging you just simply use Cout() and launch your app in terminal. Just like this:
Cout() << "My message!" << "\n";


You could use upp more advenced logging mechanism, however I think Cout() should be sufficient for our needs.

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Thu, 10 August 2017 14:19]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help wanted for DebugVisualizer
Next Topic: Upp as a shared library
Goto Forum:
  


Current Time: Wed Apr 17 01:02:05 CEST 2024

Total time taken to generate the page: 0.02049 seconds