eFMer - BoincTasks and TThrottle forum

BoincTasks For Window, Mac & Linux => Questions => Topic started by: Pichu0102 on June 22, 2020, 10:17:54 PM

Title: Boinctasks stealing window focus due to notify feature
Post by: Pichu0102 on June 22, 2020, 10:17:54 PM
Hello. The notify feature in Boinctasks is causing it to steal window focus from other windows, causing lost keystrokes when trying to type into, say, a web browser.

I noticed this would happen every 30 minutes before, so I looked in setting for something that was 30 minutes. An option of show alert every 30 minutes was checked. I disabled that, but it didn't fix the problem.

Then I saw check for notices was also set to 30 minutes. I decided to test it by setting it to check for notices every minute, and sure enough, every minute, Boinctasks would steal focus from whatever window was active at the time (even its own configuration dialog, oddly enough).

Workaround is setting it to 1440 minutes and hoping it doesn't happen at an inopportune time the next day.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on June 22, 2020, 10:48:22 PM
Quote from: Pichu0102 on June 22, 2020, 10:17:54 PM
Workaround is setting it to 1440 minutes and hoping it doesn't happen at an inopportune time the next day.
Setting the Check for new to 0 should disable. 0=Disabled.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on June 22, 2020, 10:48:52 PM
I will add this to the work schedule, to not steal the focus.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on September 09, 2020, 11:46:21 AM
Fixed in 1.81 No longer steals focus.

Anyway this only happens when a notice isn't read, once you do read it the alert stays away.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 01, 2023, 12:37:25 AM
Still doing it, every minute.  Very annoying.  The program has a bug, please do not say to try workarounds.  Just turn off the focus stealing ability.  No other program does this.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 01, 2023, 10:14:12 AM
Quote from: hucker on January 01, 2023, 12:37:25 AM
Still doing it, every minute.  Very annoying.  The program has a bug, please do not say to try workarounds.  Just turn off the focus stealing ability.  No other program does this.
There isn't a problem that I'm aware of.
If you describe the problem, that would help. How is it stealing focus, what is shown, where is the new focus?
What version of BoincTasks are you using?

In BoincTasks settings:
1) Rules, are there any rules present.
2) Gadget, Show only over icon

Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 01, 2023, 10:59:16 AM
> There isn't a problem that I'm aware of.

I'm not sure why it even has the ability to do so.  Windows shouldn't let any program do that.  Surely you can find in the program where the command is to take focus and remove it?

>If you describe the problem, that would help. How is it stealing focus, what is shown, where is the new focus?

I can be typing say in this forum, boinctasks is on another monitor displaying the task list from 8 PCs, and nothing in particular changes to cause it to take focus, it just suddenly takes focus and I find the last sentence I typed has to be typed again.

> What version of BoincTasks are you using?

1.88

> In BoincTasks settings:
> 1) Rules, are there any rules present.

No.

2) Gadget, Show only over icon

2 seconds for 1 seconds, refresh every 10 seconds.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 01, 2023, 02:04:57 PM
Quote from: hucker on January 01, 2023, 10:59:16 AM
> There isn't a problem that I'm aware of.

I'm not sure why it even has the ability to do so.  Windows shouldn't let any program do that.  Surely you can find in the program where the command is to take focus and remove it?

We are talking about hundreds of thousands of lines of code here.
I did a quick search and I can't find anything that brings the program to the foreground.
Except if you set a rule or with notices that brings the Notices tab if set.

What happens when you tell me you lose focus?
Does BoincTasks shows itself? At what window, Tasks, Notices, a Dialog?

Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 01, 2023, 03:01:42 PM
In settings, notices, I have "hide notice after 3 days", and show alert is unticked.  Check for new notices every 30 minutes.  Would any of that cause it to change focus?

I have a browser/email program/whatever maximised on monitor 1, and I'm typing into it.  I have Boinctasks on another monitor, and it just becomes in focus.  It remains on the view it was on (tasks) and doesn't produce a dialog.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 01, 2023, 04:07:29 PM
Quote from: hucker on January 01, 2023, 03:01:42 PM
I have a browser/email program/whatever maximised on monitor 1, and I'm typing into it.  I have Boinctasks on another monitor, and it just becomes in focus.  It remains on the view it was on (tasks) and doesn't produce a dialog.
I tried the same thing, nothing happens on my machine, for now I have no idea.
The only thing I can think of is a corrupt registry. Close BoincTasks and open registry editor. Go to Computer\HKEY_CURRENT_USER\Software\eFMer and rename BoincTasks to e.g. BoincTasksx and open BoincTasks again.
You can revert by closing BoincTasks, rename to original and restart BoincTasks.
What happens when you close / minimize BoincTasks.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 01, 2023, 04:37:32 PM
It doesn't happen often enough for me to do any testing - it won't do it for 2 days, then the next day it'll do it every 5 minutes for an hour.  Which makes me think it's something in particular which is sometimes occurring.  Perhaps if it loses connection with a computer and reconnects?  Would that do it?

If I change that registry entry, will all the settings be lost?
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 01, 2023, 06:06:37 PM
Quote from: hucker on January 01, 2023, 04:37:32 PM
If I change that registry entry, will all the settings be lost?
Nothing is lost as long as you don't delete that key
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 01, 2023, 06:52:09 PM
Ok I did that, it remembered all my computers, I just had to change minor things like colours.

I shall see if it still steals focus....

But I can't get it to update fast like it used to.  I put the update speed (settings, view, refresh rate) on manual, but anything under 4 seconds it just stays at 4 seconds.  I used to have it on 1 second.  I have a feeling I asked you this a long time ago and I had to override something somewhere.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 05, 2023, 11:46:47 AM
Quote from: hucker on January 01, 2023, 06:52:09 PM
But I can't get it to update fast like it used to.  I put the update speed (settings, view, refresh rate) on manual, but anything under 4 seconds it just stays at 4 seconds.  I used to have it on 1 second.  I have a feeling I asked you this a long time ago and I had to override something somewhere.
That should be it.
The counter on the bottom should say Updating in ...
A computer that responses slow might be the cause.

There is another option, BoincTasks JS that you could try, it should take over all computer settings.
You can run both programs at the same time, just to try it out.
It's in the Microsoft store.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 05, 2023, 02:26:39 PM
Since I removed the registry entries, it updates slower.  If I display one computer, it's per second.  Two computers and it's 2 seconds, and so on.  Doesn't matter which computers I display.

Total number of tasks displayed affects it maybe?  Two machines have over a thousand tasks (small Primegrid ones).  And those seem to make it slower, although they're the fastest machines, and one is this local one.

But it has stopped the focus stealing.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 05, 2023, 02:50:04 PM
Quote from: hucker on January 05, 2023, 02:26:39 PM
Total number of tasks displayed affects it maybe?  Two machines have over a thousand tasks (small Primegrid ones).  And those seem to make it slower, although they're the fastest machines, and one is this local one.
1000 should do that, you didn't disable filtering.
Best to close the window, because it will use resources when you display that many tasks.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 05, 2023, 03:33:40 PM
I want the window open all the time, I like to see the display of all the running computers all the time, that's one of the main reasons for having Boinctasks.

What is the filtering you speak of?
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 05, 2023, 03:37:27 PM
Quote from: hucker on January 05, 2023, 03:33:40 PM
What is the filtering you speak of?
Extra-> Filter tasks on Everything checked except running
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 05, 2023, 03:40:24 PM
Already set that way I think, like this?

(https://i.imgur.com/57VMeRZ.jpg)
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 05, 2023, 04:02:35 PM
Quote from: hucker on January 05, 2023, 03:40:24 PM
Already set that way I think, like this?

(https://i.imgur.com/57VMeRZ.jpg)
Yes right.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 05, 2023, 05:57:18 PM
Then I guess it's just overloaded (presumably at the viewing end).  It's a Ryzen 9 3900XT, you don't get much faster!  Of course it's busy with Boinc.  I could try upping the process priority for Boinctasks....

Nope, didn't work.  Boinctasks is only using a fraction of a core, and even if I pause Boinc on this machine it can't keep up.  I guess it's not a CPU power limitation, but a programming limitation :-)

Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 05, 2023, 06:01:36 PM
Quote from: hucker on January 05, 2023, 05:57:18 PM
Nope, didn't work.  Boinctasks is only using a fraction of a core, and even if I pause Boinc on this machine it can't keep up.  I guess it's not a CPU power limitation, but a programming limitation :-)
The BOINC client has the transfer the data that might be a limiting factor.
BoincTasks is as fast as it can it runs on one thread for each computer and one for the display.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 05, 2023, 06:55:35 PM
So how come it can display computer A fast, it can display computer B fast, but both together is slow?
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 06, 2023, 08:05:42 AM
Quote from: hucker on January 05, 2023, 06:55:35 PM
So how come it can display computer A fast, it can display computer B fast, but both together is slow?
No idea, I tested with 10.000 + tasks.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: hucker on January 08, 2023, 03:33:57 AM
Must just be a combination of slowness at all ends.  Everything is flat out on Boinc here.  If any CPO or GPU is below 95% usage, I adjust.
Title: Re: Boinctasks stealing window focus due to notify feature
Post by: fred on January 09, 2023, 08:34:56 AM
At least the problem is solved.
The Refresh rate is automatically linked to the number of tasks, so going slower is expected.
You can set it to manual, but it used extra CPU time that could be used by BOINC.