Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 136 posts ] Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9, 10  Next
Author Message
 Post subject: Re: So, what's next after v19.2?
PostPosted: Wed Feb 05, 2020 5:19 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 10928
nexter wrote:
That 'attach/detach' shelf by dragging doesn't seem to work here, or am I missing something?


Only works in Shelves and Drawers for the time being. You click on an empty space between the icons in the Shelf and drag. What version are you running anyway?

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Fri Feb 07, 2020 5:02 am 
Offline

Joined: Sat Apr 07, 2018 7:19 pm
Posts: 870
Location: UK
winstep wrote:
nexter wrote:
That 'attach/detach' shelf by dragging doesn't seem to work here, or am I missing something?

Only works in Shelves and Drawers for the time being. You click on an empty space between the icons in the Shelf and drag. What version are you running anyway?

Yes, I know - was referring to shelf, sorry. And mouse on empty space betwixt icons. On 20.1 - isn't that the right one? (And still on Win 1903.)

_________________
nexter - so, what's next?


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Fri Feb 07, 2020 9:18 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 10928
nexter wrote:
Yes, I know - was referring to shelf, sorry. And mouse on empty space betwixt icons. On 20.1 - isn't that the right one? (And still on Win 1903.)


Well, then the nexter (see what I did here?! LOL) logical question is: do you have the Shelf locked? :)

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Wed Feb 12, 2020 6:40 am 
Offline

Joined: Wed Feb 12, 2020 6:27 am
Posts: 1
DesertDwarf wrote:
Since I use a better file manager, I wouldn't mind an option to disable this feature to reduce any overhead it might create.

If that's too much trouble, then don't worry about it.

I'm glad you found a workaround.

google i'm glad too


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Wed Feb 12, 2020 8:36 pm 
Offline

Joined: Sat Apr 07, 2018 7:19 pm
Posts: 870
Location: UK
winstep wrote:
nexter wrote:
Yes, I know - was referring to shelf, sorry. And mouse on empty space betwixt icons. On 20.1 - isn't that the right one? (And still on Win 1903.)


Well, then the nexter (see what I did here?! LOL) logical question is: do you have the Shelf locked? :)

Argh! Ouch, LOL Jorge! Why didn't I think of that!? Yep, that's the problem of course! Working fine when unlocked.

Down with a very bad case of man flu, hence my delayed reply. Back to sleep now, I'm dying. ;)

_________________
nexter - so, what's next?


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Wed Feb 12, 2020 9:23 pm 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 10928
Get well soon and don't let the Mexican beers get you! :P

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Tue Mar 03, 2020 2:58 am 
Offline

Joined: Sat Apr 07, 2018 7:19 pm
Posts: 870
Location: UK
winstep wrote:
Get well soon and don't let the Mexican beers get you! :P

LOL! Thanks - but what Mexican beers? Never touch lager beers, only ales and stout. :) First day up and about again since my last post - worst and longest man flu I've ever had I think.

_________________
nexter - so, what's next?


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Tue Mar 03, 2020 3:30 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 10928
nexter wrote:
LOL! Thanks - but what Mexican beers? Never touch lager beers, only ales and stout. :) First day up and about again since my last post - worst and longest man flu I've ever had I think.


Oh boy. Ever heard of Corona beer? :wink: And what about the Corona virus (now renamed to COVID-19) ?

Anyway, glad you are feeling better. We just got the first cases here in Portugal.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Fri Mar 06, 2020 4:53 pm 
Offline

Joined: Tue Sep 30, 2014 11:58 pm
Posts: 137
Hey Jorge,

do you plan the revisit the code for system tray icon customization anytime soon?

I'm using a dock to manage the position, size and look of my tray icons since several years meanwhile, and I can't think of leaving this feature behind...

In case you aren't aware of the issues - some examples:

1. Basta Z-Mover: right click menu doesn't open.

2. Robotask: right click menu doesn't open.

3. GlassWire: A complete mess. Examples: The tray icon shows "4" alerts. I replace the icon with my own "4". And next the 5. But on 6, it shows my 4 icon again. This issue applies to several numbers. Two or three different original icons show the same customized icon.
And sometimes, it seems to loose the path completely. The list of "unowned" GlassWire tray icons grows larger and larger...
I'm aware that this software uses a lot of tray icons. Just for the pulsating effect it seems to create 100 tray icons with 1% less opacity each, or something like that. But I don't necessarily need to replace any of them. It just needs to stay like it is. Which it doesn't.

I can imaginge that this part of the code is a gigantic pita, but there has to be some logic behind the mechanism... lol At least it should...? :?


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Sat Mar 07, 2020 1:23 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 10928
toniostarcevic wrote:
I can imaginge that this part of the code is a gigantic pita, but there has to be some logic behind the mechanism... lol At least it should...? :?


You said it, it's a PITA. There's a reason only Winstep applications attempted this tray icon customization stuff (as far as I know).

Let me cut to the chase: in some cases you are better off keeping the original icons (by adding the application to the Tray Exclusion List) instead of trying to replace them.

Tray icons do not have unique persistent identifiers. The only thing the Winstep application knows for certain is which executable they come from.

An application can display multiple tray icons (for instance, Explorer is responsible for the volume icon, the net icon, the battery icon, etc...) and each of these icons can have multiple frames (e.g.; battery level, etc)

The Winstep application also needs to know how to group multi-state frames/animations belonging to a specific icon together (for instance, all the states of the tray battery icon) so it can show them to you in logical groups in the Tray Customization dialog.

So, to recognize which is which (so you can pair a specific icon with a specific higher resolution version provided by the user) the Winstep application actually needs to look at the bitmap itself. It scans the bitmap and comes up with a 32 bit CRC32 (checksum) based ID.

But here is one of the problems: scanning bitmaps pixel by pixel is (comparatively) very slow, so it's sped up by only scanning the bitmap in the diagonal(s). The drawback of this technique is being unable to uniquely identify tray icons that are very similar to each other and also belong to the same executable. So, given the right circumstances, because of the diagonal scanning a 6 or 4 might end up looking like a 5 to the Winstep application - it will think both images are the same.

Other times the Winstep application can't even get at the tray icon image (when this happens it uses the application's icon instead) because it only exists inside the Explorer process (instead of being accessible to the whole system as most of the other icons are). Back in the 32 bit world we could inject a DLL into the Explorer process so it could still get at this image and copy it into a globally accessible icon, but these days Explorer is a 64 bit process and we cannot inject a 32 bit DLL into a 64 bit process - and the Winstep application is also 32 bit.

The information that ties all these frames, icons and applications together must also be made persistent between multiple runs of the Winstep application.

So, how all this actually works is no longer fresh in my memory, but the above description should be enough for you to have an idea on how complex this really is.

Sometimes, especially given that this was optimized for multi-state icons and not for animations with a ton of frames, the Winstep application loses track of what is what and you get the orphan icons.

Emulating how the real systray works is also not without its problems - when you click on a tray icon on the dock you are NOT clicking on a real tray icon. The Winstep application must emulate this click and pass it on to the associated application - unfortunately some applications (rare, thankfully) like to think of themselves as 'special' and use non-standard ways of responding to tray icon clicks... which then don't work properly when the command is not coming from Explorer.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Sat Mar 07, 2020 2:23 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 10928
Ok, v20.3 beta released - hopefully the last beta before the official release.

You can now dock/undock docks by dragging them around (just like you could with shelves in the previous beta release) please test this feature and let me know if you see something weird.

Fixed the MSN weather forecast so it now falls on the proper days - unfortunately this means the last day is always shown as N/A since MSN in practice only provides a 4 day weather forecast.

Fixed the 'Repeat every <x> years' option in Alarms, which was completely broken.

Icons in a dock pointing to Explorer.exe now only show a running indicator if an Explorer window is actually open.

Showing a decimal place in CPU usage percentage is now enabled by default.

Added 'Disable simulated ALT key press when forcing windows to the foreground' setting to the More Options dialog in the General tab of Preferences. This should be checked only if you are having trouble with ALT+TAB or the ALT key getting stuck (which should no longer happen since the last official release, but...)

The width of *single line* checkboxes in the User Interface is now automatically cropped so that clicking on a blank space right after the setting description should no longer toggle the setting (previously it would because the checkbox needed invisible padding space to accommodate the usually longer non-English translations).

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Sat Mar 07, 2020 7:03 am 
Offline

Joined: Tue Sep 30, 2014 11:58 pm
Posts: 137
winstep wrote:
toniostarcevic wrote:
I can imaginge that this part of the code is a gigantic pita, but there has to be some logic behind the mechanism... lol At least it should...? :?


You said it, it's a PITA. There's a reason only Winstep applications attempted this tray icon customization stuff (as far as I know).

Let me cut to the chase: in some cases you are better off keeping the original icons (by adding the application to the Tray Exclusion List) instead of trying to replace them.

Tray icons do not have unique persistent identifiers. The only thing the Winstep application knows for certain is which executable they come from.

An application can display multiple tray icons (for instance, Explorer is responsible for the volume icon, the net icon, the battery icon, etc...) and each of these icons can have multiple frames (e.g.; battery level, etc)

The Winstep application also needs to know how to group multi-state frames/animations belonging to a specific icon together (for instance, all the states of the tray battery icon) so it can show them to you in logical groups in the Tray Customization dialog.

So, to recognize which is which (so you can pair a specific icon with a specific higher resolution version provided by the user) the Winstep application actually needs to look at the bitmap itself. It scans the bitmap and comes up with a 32 bit CRC32 (checksum) based ID.

But here is one of the problems: scanning bitmaps pixel by pixel is (comparatively) very slow, so it's sped up by only scanning the bitmap in the diagonal(s). The drawback of this technique is being unable to uniquely identify tray icons that are very similar to each other and also belong to the same executable. So, given the right circumstances, because of the diagonal scanning a 6 or 4 might end up looking like a 5 to the Winstep application - it will think both images are the same.

Other times the Winstep application can't even get at the tray icon image (when this happens it uses the application's icon instead) because it only exists inside the Explorer process (instead of being accessible to the whole system as most of the other icons are). Back in the 32 bit world we could inject a DLL into the Explorer process so it could still get at this image and copy it into a globally accessible icon, but these days Explorer is a 64 bit process and we cannot inject a 32 bit DLL into a 64 bit process - and the Winstep application is also 32 bit.

The information that ties all these frames, icons and applications together must also be made persistent between multiple runs of the Winstep application.

So, how all this actually works is no longer fresh in my memory, but the above description should be enough for you to have an idea on how complex this really is.

Sometimes, especially given that this was optimized for multi-state icons and not for animations with a ton of frames, the Winstep application loses track of what is what and you get the orphan icons.

Emulating how the real systray works is also not without its problems - when you click on a tray icon on the dock you are NOT clicking on a real tray icon. The Winstep application must emulate this click and pass it on to the associated application - unfortunately some applications (rare, thankfully) like to think of themselves as 'special' and use non-standard ways of responding to tray icon clicks... which then don't work properly when the command is not coming from Explorer.


Okay, that's much worse than I thought it is. We should be thankful for what we have.
It just came to mind that the tray icon topic seems to be generally an infamous one.
The developers of VMware seem to not like it very much aswell.
I've seen several questions about showing tray notifications from the guest OS inside the host OS, and the reaction was always like "we think about it" and the last reaction was like 5 years ago...
And that should not be as demanding as icon customization...


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Sat Mar 07, 2020 8:24 am 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 10928
The problem is that Windows does not pass ANY information to 3rd party applications about tray icons, nor does it offer any way to know what icons are being displayed, etc... basically the only API calls we have available are for ADDING and MANIPULATING your OWN icons to the tray.

Even the way the Winstep application gets the list of tray icons is nothing short of complicated black magic hacking: it needs to get the handle of the actual systray window, get the process handle of Explorer, and, using this, allocate memory within the Explorer process itself using VirtualAllocEx to get enough space for a structure we can fill with each tray icon information (the tray is actually a standard toolbar so it responds to certain messages), send messages to the tray window to know the number of icons in the tray, copy each tray icon info structure (undocumented by the way) using another message to the piece of memory we previously allocated inside the Explorer process, then copy the structure to our own process using ReadProcessMemory, etc...

Luckily Microsoft current developers seem to be afraid of the tray too, so much so that the basic structure hasn't been touched since the XP days. Let's hope it remains that way or even what we currently have will stop working.

The same problem of not being able to get at what is going on occurs with the new features of the Windows 10 taskbar, for instance. Everyone would like to see taskbar icons in the Winstep application support badges, but that would only be possible/straightforward if Microsoft actually provided an API to know what the hell is going on within the other application's taskbar buttons - and it doesn't, so all those things are private to Windows and the application itself.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Sat Mar 07, 2020 6:01 pm 
Offline

Joined: Tue Sep 30, 2014 11:58 pm
Posts: 137
winstep wrote:
Luckily Microsoft current developers seem to be afraid of the tray too, so much so that the basic structure hasn't been touched since the XP days.


That's what I thought. I have a tool to hide specific tray icons (PS Tray Factory) which I don't think has been changed very much since Windows XP - it still has the XP design - but it still works.


winstep wrote:
Let's hope it remains that way or even what we currently have will stop working.


Yeah, but there's a chance that the situation might even become better when they change it. I think it would be in everyone's favour - themself included - to make the system more consistent...


Just noticed that the problem with the GlassWire tray icon has gotten worse.
Now, when going to

Winstep Properties -> System Tray -> Customize System Tray Icons

there are only orphan icons related to GlassWire. So there's no way to restore the original icon. I can only drag an icon onto it and this one sticks. But it's not shown in the list anymore.
Probably when disabling tray icon customization and re-enabling it. Does this reset all customization?
But however - I'd rather stick with the "frozen" GlassWire icon than having to re-do the customization for all icons.
The problem probably would come back anyway.
And it would also look quite terrible to have one muddy 16 x 16 or 32 x 32 icon between all the crisp and sharp 96 x 96 black & white style icons that I made.


Edit: Side note - I didn't install PS Tray Factory on this Windows installation yet. In case you think it could interfere with Winstep.


Back to top
 Profile  
 
 Post subject: Re: So, what's next after v19.2?
PostPosted: Sun Mar 08, 2020 9:56 pm 
Offline
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 10928
toniostarcevic wrote:
Probably when disabling tray icon customization and re-enabling it. Does this reset all customization?


Yes. It deletes the image + info cache that ties everything together.

Anyway, has anyone reading this already tried the new beta? Is the dock's dock/undock feature by dragging operating normally? Is it intuitive how to change the orientation of a dock when dragging (e.g.; from docked to the top to docked to the left)?

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 136 posts ] Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9, 10  Next
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: Google [Bot] and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: