It is currently March 28th, 2024, 11:08 pm

Plugin TrayIcon

Share and get help with Plugins and Addons
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Plugin TrayIcon

Post by Active Colors »

What I have also noticed is that while the test skin is running, refreshing individual skins or updating all skins at once creates a lag. The bigger (more complex) the skin - the longer the lag will last right after I refresh any skin/all skins.

Hence, when I refresh a skin which doesn't use the plugin it will lag if there is some other running skin which uses the plugin.

Also, I made sure the skin which uses the plugin:
• is set to Update=-1.
• has UpdateDivider=-1 everywhere.
• has no DynamicVariables anywhere.


EDIT:
• In my case I have only one complex skin, two smaller skins, and one skins with your plugin.
• When I refresh my complex skin the lag lasts 1 second.
• Two other small skins do not produce visual lags when I refresh them individually.
• I believe there is a lag even for small skins but since they are very small skins the lag is very-very short.
• If I add more skins, especially larger or complex skins, they will lag too if I refresh them individually and they will contribute to the common lag when I refresh all loaded skins making the lag last longer.
• If I add more skins which use the plugin they will also contribute to the lag. I.e. when I have only one complex skin it will make a lag of 1 second if there is only 1 skin runs using the plugin. If I add 2 more skins which use the plugin the lag time for the same complex skin will be increased from 1 second to 3.
• Unloading the skin(s) which use the plugin will stop making any skin lag when refreshing them.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Plugin TrayIcon

Post by death.crafter »

Active Colors wrote: February 14th, 2022, 1:03 pm After Rainmeter runs this plugin (the test skin) for some time, Rainmeter will:

1) Start producing visual glitches that spread to various parts of Windows and/or other Rainmeter skins.
2) Rainmeter and/or skins become unresponsive.
3) Tray icon becomes invisible (the tray element is there but the graphical icon is invisible)

I am not sure if this is related to the problem which Judian81 has. There are some differences between Judian81 and my case.
For Judian81 it happens after the Refresh all and the tray icon stops blinking. For me it happens simply after some time and the tray icon becomes invisible.

Anyhow, I am now trying the test skin again but with the modified code to make tray icon not change every second. In my case it could be due to the every second changing icon.

Couple of visual glitches attached.
Could you try running the previous release of the plugin?

Tho I'm not sure what could cause this problem. I guess I would have to ask Brian about it. Thanks for trying it out.
from the Realm of Death
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Plugin TrayIcon

Post by death.crafter »

Active Colors wrote: February 14th, 2022, 1:39 pm What I have also noticed is that while the test skin is running, refreshing individual skins or updating all skins at once creates a lag. The bigger (more complex) the skin - the longer the lag will last right after I refresh any skin/all skins.

Hence, when I refresh a skin which doesn't use the plugin it will lag if there is some other running skin which uses the plugin.

Also, I made sure that the skin A which uses the plugin:
• is set to Update=-1.
• has UpdateDivider=-1 everywhere.
• has no DynamicVariables anywhere.


EDIT:
• In my case I have only one complex skin, two smaller skins, and one skins with your plugin.
• When I refresh my complex skin the lag lasts 1 second.
• Two other small skins do not produce visual lags when I refresh them individually.
• I believe there is a lag even for small skins but since they are very small skins the lag is very-very short.
• If I add more skins, especially larger or complex skins, they will lag too if I refresh them individually and they will contribute to the common lag when I refresh all loaded skins making the lag last longer.
Hmm, it seems to have something to do with the message hook. I am using a WH_CALLWNDPROC hook, which receives the window messages sent to any skin before it's window procedure is called.

Though it's a guess, this is all I have. Also, I am not able to reproduce the issue. So it might be hard for me to debug.

Also, Judian81, what version of windows are you using?
from the Realm of Death
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Plugin TrayIcon

Post by Active Colors »

By the way, the lag happens not only with refreshing skins but also interacting with meters that have a bunch of bangs like !SetOption and !UpdateMeter, loading skins, loading Rainmeter, and interacting with various parts of Rainmeter like opening and closing Manage window (probably specifically loading the installed skins directory).
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Plugin TrayIcon

Post by Active Colors »

I have just tried running all the previous versions with some results.

The latest 1.1.0.0 version is the ONLY version which creates this lag thing. Any other version including the previous one 1.0.0.2 do not cause the lag. Not even slightest, buttery smooth and no lags at all no matter how many complex skins I run and no matter how many skins which use this plugin are loaded.

I read that you have added mouse scroll actions in the 1.1.0.0 version, so I tried to remove the scrolling actions in the test skin and the lag is still there even after restarting Rainmeter. So, I suppose there is something else that you have added or changed in this version.

I have restarted my laptop and I am running now the 1.1.0.0 version once more to see if I catch again the glitches (both visual and Rainmeter disfunction).
I will check the previous versions for all the glitches later. My guess is that since the previous versions of the plugin do not produce the lag issue, they could also be free of the glitches issues.

I thought that something in Windows 7 could be the problem, however, since Judian81 has Windows 10 (judging by their screenshots) I feel the problem(s) could be either on the hardware level, driver level, some other factors (i.e. some libraries that the plugin is using are not updated to the latest version?) or combination of several things. We are yet to find out.
Judian81
Posts: 180
Joined: May 6th, 2021, 2:57 pm

Re: Plugin TrayIcon

Post by Judian81 »

Active Colors wrote: February 14th, 2022, 1:03 pm
I am not sure if this is related to the problem which Judian81 has. There are some differences between Judian81 and my case.
For Judian81 it happens after the Refresh all and the tray icon stops blinking. For me it happens simply after some time and the tray icon becomes invisible.

Couple of visual glitches attached.
it is correct that rainmeter could crache and the menu is not availible. and can not open rainmeter main window.
Judian81
Posts: 180
Joined: May 6th, 2021, 2:57 pm

Re: Plugin TrayIcon

Post by Judian81 »

death.crafter wrote: February 14th, 2022, 2:11 pm Hmm, it seems to have something to do with the message hook. I am using a WH_CALLWNDPROC hook, which receives the window messages sent to any skin before it's window procedure is called.
i think you are right on this part. it has to have a hwnd from the part you want to speak to. if it is not there anymore it could crache.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Plugin TrayIcon

Post by death.crafter »

Active Colors wrote: February 14th, 2022, 2:46 pm I have just tried running all the previous versions with some results.

The latest 1.1.0.0 version is the ONLY version which creates this lag thing. Any other version including the previous one 1.0.0.2 do not cause the lag. Not even slightest, buttery smooth and no lags at all no matter how many complex skins I run and no matter how many skins which use this plugin are loaded.

I read that you have added mouse scroll actions in the 1.1.0.0 version, so I tried to remove the scrolling actions in the test skin and the lag is still there even after restarting Rainmeter. So, I suppose there is something else that you have added or changed in this version.

I have restarted my laptop and I am running now the 1.1.0.0 version once more to see if I catch again the glitches (both visual and Rainmeter disfunction).
I will check the previous versions for all the glitches later. My guess is that since the previous versions of the plugin do not produce the lag issue, they could also be free of the glitches issues.

I thought that something in Windows 7 could be the problem, however, since Judian81 has Windows 10 (judging by their screenshots) I feel the problem(s) could be either on the hardware level, driver level, some other factors (i.e. some libraries that the plugin is using are not updated to the latest version?) or combination of several things. We are yet to find out.
Okay, in the latest 1.1.0.0, I have added a low level mouse hook, which could be the cause of the problem, but I am not sure as other people don't report anything weird. I am waiting for eclectic-tech, in case he faces the same issue.
from the Realm of Death
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Plugin TrayIcon

Post by eclectic-tech »

Sorry for jumping in late... but I have not experienced any of the same issues, no lag and no problem with the context menu.

I have had a trayicon skin running for over a day with no issues.
The only modification was eliminating the blink measure all together, changing the mouse action bangs, and setting the skin update to -1.

I appreciate the added mouse bangs D.C., (would have liked middle mouse up also :???: ) but if this is causing issues, I can live without some of the added actions.

EDIT: System Specs
Rainmeter 4.5.11.3607 (64-bit)
Language: English (1033)
Build time: 2022-02-12 8:49:20
Windows 10 Pro 2009 64-bit (build 19044) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\John\Rainmeter\Skins\
SettingsPath: C:\Users\John\AppData\Roaming\Rainmeter\
IniFile: C:\Users\John\AppData\Roaming\Rainmeter\Rainmeter.ini
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Plugin TrayIcon

Post by death.crafter »

eclectic-tech wrote: February 15th, 2022, 1:16 am Sorry for jumping in late... but I have not experienced any of the same issues, no lag and no problem with the context menu.

I have had a trayicon skin running for over a day with no issues.
The only modification was eliminating the blink measure all together, changing the mouse action bangs, and setting the skin update to -1.

I appreciate the added mouse bangs D.C., (would have liked middle mouse up also :???: ) but if this is causing issues, I can live without some of the added actions.

EDIT: System Specs
Rainmeter 4.5.11.3607 (64-bit)
Language: English (1033)
Build time: 2022-02-12 8:49:20
Windows 10 Pro 2009 64-bit (build 19044) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\John\Rainmeter\Skins\
SettingsPath: C:\Users\John\AppData\Roaming\Rainmeter\
IniFile: C:\Users\John\AppData\Roaming\Rainmeter\Rainmeter.ini
Thank you for confirming eclectic-tech. I can add the middle mouse up action, but I would ask Brian about it first, in case he finds out something wrong with it.

Thanks again.
from the Realm of Death