This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Bug and Issues
 Resolved Bugs and Issues
 [CLOSED] slow cursor when drawing a gesture
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

beholder

60 Posts

Posted - 05/03/2012 :  19:38:46  Show Profile
XP SP2 here on low-speed machine, HD display.

Gesture making is slow in the beginning of drawing when a gesture is being made. I am literally talking about a small cursor jerk, then gesture is drawn.
I presume this has to do something with drawing/unhiding the transparent window where a gesture is drawn at. When I turned on the transparent window display ON at all times, then the problem disappeared (but another appeared, more about that in another post).

I didn't have this problem in SI although I remember there was a particularly problematic gesture drawing right after some larger program managed to load (this was reported on SI forum too, the gesture was drawn not based on cursor movement only connected from beginning to end by a straight line and it often got 'stuck'). But the problem of jerky S+ cursor movement is that it is there EVERY TIME a gesture is drawn.

What could be done? Let's not talk about switching on transparent window at all times, let's focus on a solution to the actual problem. Well, perhaps you could draw the gesture line directly to overlay. We're talking about XP and DX9, not other systems where a high-powered system is a necessity, not a virtue. Overlay is not a window and is not "transparent" so no slowdowns would happen there. I dug up some info here, perhaps it's relevant: http://msdn.microsoft.com/en-us/library/windows/desktop/dd797814(v=vs.85).aspx

SI does something like that perhaps. But I am not sure. Because when I draw a gesture in SI and move wheel at the same time and the underlaying Opera or MS Word viewport content moves, the gesture "moves" with it. A peculiar and interesting effect and perhaps a window to more efficient gesture drawing for S+.

Current fav pr0nstar: Malena Morgan
http://www.artlk.com/2012/04/malena-morgan-sensational-pictures.html
 

Rob

USA
2615 Posts

Posted - 05/03/2012 :  22:15:20  Show Profile  Visit Rob's Homepage
I know exactly how Jeff handles it in XP (as mentioned here http://www.strokesplus.com/forum/topic.asp?TOPIC_ID=230).

In XP, you can select the screen's device context, which is what SI is doing, then, instead of drawing an actual line, he's XORing along the path, which is why the colors seem to invert rather than form a solid line like S+ (or SI under Aero). Then he retraces the path, XORing again to invert back to the original color underneath (after letting go of the gesture button). By the way, S+ has a transparent window that covers the entire desktop and is the color white, but with white being the color key (which color is to be transparent). When you draw a gesture, that window is brought to the top (if the keep gesture draw window on top is unchecked) and the line draws in point segments. When you let go, S+ redraws the path with a white brush, thus making the gesture transparent again (draw a very long gesture, try to paint the screen and you'll see the path is being retraced). I actually wanted to make the gesture line be anti-aliased using GDI+, but the problem is that the AA leaves traces of the background (obviously, to make the line smooth), so retracing it doesn't completely erase the line...and invalidating the screen is out of the question as it causes every window/control to repaint themselves (flicker). Believe me, I spent 75% of development in making the action of drawing and capturing modifiers as smooth as possible. But I also knew that lower powered systems would simply have to turn off the gesture line due to Aero needing far more system resources than XP, knowing that I was making S+ for power users. I started out trying to make S+ use different drawing methods for XP and Vista (at the time), but in the end, I found it to be more of a headache. When I restarted at the end of 2011, I really felt there was little point with Win7 being such an excellent OS and XP ultimately fading into history. (yea, yea, I know people are stuck on XP, but I just do not understand why..hence the complaint about this stutter

As I mentioned to Cerberus, I'm simply not that motivated to change everything about the way S+ draws gestures just to support XP, which is, in my mind, a legacy OS at this point (despite those who are holding onto it with some blind passion). MS stopped main stream support 3 years ago and all support (extended support) ends in 2 years. It sounds like a cop out, and maybe it is to some degree, but I simply don't make enough money on this project to invest time developing anything for the past. Win 7 runs the same or better on any hardware that XP can.

The only possible thing I can think of to try is maybe spawn the SetWindowState function into a new thread, potentially not snagging the mouse as the MouseProc will be running independently while the window is brought forward. This could benefit all installations. However, that (as you know and is in the thread above) causes a really annoying flicker in Windows XP (the common theme here being XP is where problems mostly reside).

I realize I may sound like an asshole about this; but in the end it comes down to the only thing we have in this life: time. Why do you think Jeff doesn't update SI but every few years? He has a life Now, I'm willing to make the compromise of actually remaining active and doing my best to address issues (which I always do, sans Kingron's action that randomly brings S+ to its knees, but I can't get it to happen on my system) and improve S+ to keep up with the times, but I don't want to spend what (now) little time I actually do have on S+ to make it work better on under-powered systems that are frankly out of date (I'm fully prepared for your assault, Cerberus!). I still haven't managed to tackle the Unicode conversion (which is only hung up on one little area of code that's driving me nuts), plus the whole thing really needs to be refactored, but I haven't even begun that one yet.

To be honest, I've actually thought about rebuilding S+ from the ground up, but stripping everything out other than the core functionality and Lua (read: no S+ internal actions), not even a user interface. The whole thing runs from an XML file, I'd rather make enhancements and have other people build programs to work with the XML file as necessary.

Disclaimer: I've had a few to drink and am probably coming across a little harsh and/or pessimistic, but in reality, I'm feeling nervous that I'm becoming like Jeff. I made S+, but am now bored and don't have the same motivation (obsession) to keep working on it every day while getting little in return (this is why so many non-commercial efforts fizzle out, but big THANKS to those who have donated!). I'm not there yet, but I guess time will tell. I may get re-energized one day and bury myself into S+ development for a couple months straight (like I did to finish it), I spent about 3 months in 2009 working on it, then gave up until last December; then poured myself into it for another 3-4 months (thankfully finishing a functioning application!)...and now I'm losing steam again.

However, as I've said before, I check the forum every single day, throughout the day. I will ALWAYS respond and help folks out (never just disappear like you know who) and do my best to address bugs or add features which no one could argue aren't necessary...but the one-off requests, they're probably going to sit for a while..but then, just like around 4/19 (after a month of nothing), I'll decide to work on another piece or something..so I haven't given up. I really need to rewrite S+ in a way that someone else could actually follow it =) I know that some day I'll just open source it and people can do what they want with it..but it really needs to be rewritten first or I'd spend every day explaining what the hell it's doing (I knew nothing of C++ or pure WinAPI app dev when I began this endeavor..).

Anyway, this went a little off-topic..but I think I mostly addressed the question (DirectX is out of the question, that just adds a shit-ton of overhead and limitations)...though not quite to your liking, I'm sure (and I do apologize).

I'm looking forward to reading your "(but another appeared, more about that in another post)" as I'm curious what you ran into...maybe something can be fixed there instead

Rob

Go to Top of Page

Rob

USA
2615 Posts

Posted - 05/04/2012 :  19:16:01  Show Profile  Visit Rob's Homepage
Try the files in http://www.strokesplus.com/forum/topic.asp?TOPIC_ID=323 and let me know if there's any noticeable difference.
Go to Top of Page

beholder

60 Posts

Posted - 05/04/2012 :  20:43:10  Show Profile
Dude, you nailed it. Mission accomplished par excellence.

Current fav pr0nstar: Malena Morgan
http://www.artlk.com/2012/04/malena-morgan-sensational-pictures.html
 
Go to Top of Page

beholder

60 Posts

Posted - 05/04/2012 :  20:57:32  Show Profile
Oh, btw, you can put this into Resolved Bugs and Issues forum branch.
I really wonder if this affects also the performance on the Win Vista and Win7 desktop. I presume it does which makes last 2 days really really cool.

---------------------------------------------
Current fav pr0nstar: Malena Morgan
http://www.artlk.com/2012/04/malena-morgan-sensational-pictures.html
 
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000