[Windows] Keep Kodi Always-on-Top (instead of minimizing on focus loss)

  Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Shine Offline
Senior Member
Posts: 102
Joined: Apr 2012
Reputation: 8
Post: #31
No, this is not possible with DX9, sorry.
find quote
Cryps Offline
Junior Member
Posts: 2
Joined: Dec 2016
Reputation: 0
Post: #32
I had a feeling it wouldn't be. No worries, back to using AHK. Thanks for your quick response.
find quote
Carnage88uk Offline
Junior Member
Posts: 1
Joined: Jan 2017
Reputation: 0
Post: #33
literally just created an account to thank you for this update! It updated all of my kodi to look beautiful and works wonderfully too so thank you!
find quote
MrDartay Offline
Junior Member
Posts: 4
Joined: Nov 2016
Reputation: 0
Post: #34
(2016-12-12 18:12)Shine Wrote:  
(2016-11-18 14:06)MrDartay Wrote:  Before trying this build I was running into issues with Kodi (set to windowed fullscreen) jumping to other monitors for no reason. This hasn't happened after trying your build. Could the two things be related? Hope to hear from you.
You should first try to get this original problem fixed, as this sounds like a problem with your system, not with Kodi. If you're confident that it's a problem with Kodi, you might want to submit a bug report. Please do not use my build when submitting a bug report, use the official version instead - my build is completely unsupported and no one will help you!

Hello again and thanks for your response!

Thanks again for putting time and effort into this build, me and mine appreciate it a lot. My previous post was very poorly phrased. I've also made some progress with the various issues I've been encountering, so I thought it was a good idea to drop another post and clarify the described issues..

Jumping
Firstly to clarify. The window-jumping behaviour had nothing to do with your custom build. It was caused by several factors. Long story short: a 3-monitor setup containing a 144hz Gsync monitor does not play well with Jarvis. The gsync module supplies enormous lists of EDID info which causes a hiccup somewhere. Also, this specific monitor (PG278Q) goes into a 'deep sleep' mode that messes with the setup. Upgrading to Krypton took complete care of this issue. (Your custom build was the very first Krypton build I tried, hence the earlier confusion.)

Unusable windows
As to the other mentioned issue.. When this custom build of Kodi is set to 'always on top'. The action of dragging, minimising, restoring or maximising windows on other monitors can turn them transparent. When they are transparent it is not possible to interact with the windows. There are two ways to return them to functionality: (1) shutdown kodi or (2) drag another window (that wasn't made unusable) over the transparent window. Turning the option off or running the official Krypton will not cause the issue. I have provided a screenshot. Note that the active window in the screenshot is 'Local Disk (D)' which is on the same monitor, but invisible under the stack of transparent unusable 'stuck' windows. This happens only in this custom build with 'always on top' turned on.

Thanks again for all your hard work. I hope this post can make a contribution. If you would like me to make a video of the issue happening please let me know.


Link to screenshot of issue:
http://i.imgur.com/S7Pgv7m.jpg
(This post was last modified: 2017-01-21 00:36 by MrDartay.)
find quote
HTPC-ASR Offline
Junior Member
Posts: 44
Joined: Oct 2015
Reputation: 0
Post: #35
it's time to.... Big GrinBig Grin

https://kodi.tv/kodi17/
find quote
bounguine Offline
Junior Member
Posts: 26
Joined: Jun 2013
Reputation: 0
Post: #36
I tested Kodi 16 executive posted here on Pipo X8 with extra monitor plugged in with "always on top" option active.

Prerequisites:
1. Monitor 1 - explorer window 1,
2a. Monitor 2 - Explorer window 2, Kodi (not full screen).
2b. Monitor 2 - Kodi (full screen).

1 and 2b. Click with mouse on Explorer window 1.
Kodi never gets focus on it (keyboard doesn't work with Kodi menu).

2a. Click with mouse on Explorer window 2.
Explorer window 2 is always beyond Kodi, but Kodi never gets focus on it (keyboard doesn't work with Kodi menu).

In the three cases to use keyboard with Kodi I must click at first with mouse on Kodi.

For me it's not "always on top", but "above on 1 monitor without focus".

I don't remember the name of the executive I tested a year ago, but it truelly sets the focus on Kodi in some seconds after a user clicks on any other window.
find quote
Shine Offline
Senior Member
Posts: 102
Joined: Apr 2012
Reputation: 8
Post: #37
What you mean is keeping/stealing focus. This patch is not meant for that.

The patch is for Kodi to stay visible even when it loses focus. In my case, I run Kodi full screen on screen 2 (TV) while working on screen 1 (Monitor) at the same time. I don't want Kodi to keep stealing focus, since that wouldn't allow me to use my computer while Kodi is running.
find quote
yonith Offline
Junior Member
Posts: 2
Joined: Dec 2012
Reputation: 0
Post: #38
Shine I can't thank you enough for making this. I have been limping along with Launcher4Kodi which doesn't always work and is such a hackey solution. This absolutely needs to be a feature in production Kodi. It's a bigger issue than the Kodi devs are willing to acknowledge in my opinion. Thanks again!
find quote
theologian Offline
Junior Member
Posts: 2
Joined: Aug 2012
Reputation: 0
Post: #39
Shine,
Can you create a Krypton 17.3 with always-on-top patch please? I couldn't figure out how to do it myself. I'm new to all of this here.
Thank you so much.
find quote
yonith Offline
Junior Member
Posts: 2
Joined: Dec 2012
Reputation: 0
Post: #40
(2017-05-29 13:43)theologian Wrote:  Shine,
Can you create a Krypton 17.3 with always-on-top patch please? I couldn't figure out how to do it myself. I'm new to all of this here.
Thank you so much.

bump!
find quote
bounguine Offline
Junior Member
Posts: 26
Joined: Jun 2013
Reputation: 0
Post: #41
(2017-02-07 15:23)Shine Wrote:  What you mean is keeping/stealing focus. This patch is not meant for that.

The patch is for Kodi to stay visible even when it loses focus. In my case, I run Kodi full screen on screen 2 (TV) while working on screen 1 (Monitor) at the same time. I don't want Kodi to keep stealing focus, since that wouldn't allow me to use my computer while Kodi is running.

My aim is to always have the possibility to use remote control.
If Kodi is not in focus (not on top and above any other window), it is impossible.
Your topic's name is misleading then.
In your case it is not "always on top" (like in Ubuntu, when it is on top and is keeping focus until you click on another app).
It is "always seen".
Launcher4Kodi and CRP are more like Ubuntu's behaviour, but the annoying thing is that you cannot work with another apps.
find quote
Shine Offline
Senior Member
Posts: 102
Joined: Apr 2012
Reputation: 8
Post: #42
(2017-02-06 21:34)bounguine Wrote:  I tested Kodi 16 executive posted here on Pipo X8 with extra monitor plugged in with "always on top" option active.

Prerequisites:
1. Monitor 1 - explorer window 1,
2a. Monitor 2 - Explorer window 2, Kodi (not full screen).
2b. Monitor 2 - Kodi (full screen).

1 and 2b. Click with mouse on Explorer window 1.
Kodi never gets focus on it (keyboard doesn't work with Kodi menu).

2a. Click with mouse on Explorer window 2.
Explorer window 2 is always beyond Kodi, but Kodi never gets focus on it (keyboard doesn't work with Kodi menu).

In the three cases to use keyboard with Kodi I must click at first with mouse on Kodi.

For me it's not "always on top", but "above on 1 monitor without focus".

I don't remember the name of the executive I tested a year ago, but it truelly sets the focus on Kodi in some seconds after a user clicks on any other window.

(2017-06-23 22:19)bounguine Wrote:  My aim is to always have the possibility to use remote control.
If Kodi is not in focus (not on top and above any other window), it is impossible.
Your topic's name is misleading then.
In your case it is not "always on top" (like in Ubuntu, when it is on top and is keeping focus until you click on another app).
It is "always seen".
Launcher4Kodi and CRP are more like Ubuntu's behaviour, but the annoying thing is that you cannot work with another apps.

I don't understand you. You're contradicting yourself in these two posts.

In your first post, you say you are clicking on another window and Kodi is losing focus, and you don't like that.
In your second post, you say, you want Kodi to stay focussed until you click on another window (which is exactly what my patch is doing, apart from staying topmost, ie. visible).

Again, this patch isn't meant get the behavior you are describing in your first post (ie. re-stealing focus). It is specifically meant to stay on top while explicitly not stealing focus (which, by the way, is the behavior you are describing in your second post). If you don't like that behavior, this patch is not for you and you might want to stick with vanilla Kodi.

Either way, the denomination "Always On Top" in the Windows world means the window property "HWND_TOPMOST". Just how the "Always On Top" option in Windows Task Manager works. I don't know and don't care what "Always On Top" means in the Ubuntu world, as I'm not using Ubuntu nor is this patch for Ubuntu.

And now let's stop talking about semantics, as this is a developer forum, not a language lesson.

If you want to use your remote control at all times, in Linux you can use LIRC, and in Windows there are several other possibilities (unfortunately LIRC support is removed from the Windows version of Kodi for reasons unknown to me). I, for example, am using EventGhost with the XBMC2 plugin.

For everyone else who was just waiting for a new build: I updated to 17.3 a couple of days ago (see first post). Enjoy!
(This post was last modified: 2017-06-25 16:19 by Shine.)
find quote
SOsound Offline
Junior Member
Posts: 3
Joined: Jun 2017
Reputation: 0
Post: #43
(2016-02-02 21:28)Shine Wrote:  Revisiting my previous proposal of an always-on-top option for Kodi (see here and here et al. in the DX11 test thread).

I haven't had any time yet to try and fix the remaining issue (see below), so I didn't PR it against master, but I saw people asking for an always-on-top option during Jarvis beta phase. So I figured I could just provide the patch as-is for now.

How does it work?

The patch provides an option in System -> Video output (settings level: Advanced or higher) that makes Kodi the topmost window, ie. other windows won't be able to cover it. Also, in true fullscreen mode, it won't automatically minimize when losing focus. This is particularly useful for multi-screen setups, so you can watch stuff with Kodi on one screen while working with other programs on another screen.
NB: The option is disabled by default, you will have to explicitly enable it!

How to get it?

Krypton: Jarvis: Isengard:
Known issue (only applies to true fullscreen mode):
  • If another always-on-top window pops up behind Kodi during video playback, Kodi will fall back to "fullscreen window" mode.
  • If another always-on-top window pops up behind Kodi while the Kodi GUI is active, the GUI will freeze (not hang - you can still work blindly).
Once I figure out a way to work around these issues without breaking anything else, I will PR this. Enjoy.
thanks for your update. Great tutorial.
find quote
goldsac Offline
Junior Member
Posts: 24
Joined: Sep 2011
Reputation: 0
Post: #44
(2017-01-21 00:35)MrDartay Wrote:  
(2016-12-12 18:12)Shine Wrote:  
(2016-11-18 14:06)MrDartay Wrote:  Before trying this build I was running into issues with Kodi (set to windowed fullscreen) jumping to other monitors for no reason. This hasn't happened after trying your build. Could the two things be related? Hope to hear from you.
You should first try to get this original problem fixed, as this sounds like a problem with your system, not with Kodi. If you're confident that it's a problem with Kodi, you might want to submit a bug report. Please do not use my build when submitting a bug report, use the official version instead - my build is completely unsupported and no one will help you!

Hello again and thanks for your response!

Thanks again for putting time and effort into this build, me and mine appreciate it a lot. My previous post was very poorly phrased. I've also made some progress with the various issues I've been encountering, so I thought it was a good idea to drop another post and clarify the described issues..

Jumping
Firstly to clarify. The window-jumping behaviour had nothing to do with your custom build. It was caused by several factors. Long story short: a 3-monitor setup containing a 144hz Gsync monitor does not play well with Jarvis. The gsync module supplies enormous lists of EDID info which causes a hiccup somewhere. Also, this specific monitor (PG278Q) goes into a 'deep sleep' mode that messes with the setup. Upgrading to Krypton took complete care of this issue. (Your custom build was the very first Krypton build I tried, hence the earlier confusion.)

Unusable windows
As to the other mentioned issue.. When this custom build of Kodi is set to 'always on top'. The action of dragging, minimising, restoring or maximising windows on other monitors can turn them transparent. When they are transparent it is not possible to interact with the windows. There are two ways to return them to functionality: (1) shutdown kodi or (2) drag another window (that wasn't made unusable) over the transparent window. Turning the option off or running the official Krypton will not cause the issue. I have provided a screenshot. Note that the active window in the screenshot is 'Local Disk (D)' which is on the same monitor, but invisible under the stack of transparent unusable 'stuck' windows. This happens only in this custom build with 'always on top' turned on.

Thanks again for all your hard work. I hope this post can make a contribution. If you would like me to make a video of the issue happening please let me know.


Link to screenshot of issue:
http://i.imgur.com/S7Pgv7m.jpg

I can echo the unusable windows issue, exact same symptoms as MrDartay. I'd disable the option, but the alternative is to have playback when focus is lost, which wasn't an issue w prior versions (anyone able to help w this separate issue?).

Anyhow, one thing that might be helpful - you do not have to shut down Kodi to fix the issue when it happens. Hit ctrl-alt-del and select task manager and you're back in business. Still rather annoying to have to do this regularly, though - hopefully a fix can be found!
find quote
Shine Offline
Senior Member
Posts: 102
Joined: Apr 2012
Reputation: 8
Post: #45
Thanks for reporting. However, I still can't reproduce this. If anyone of you can dig any deeper, e.g. by analyzing window properties before/after the issue occurs, I might have a chance to understand what's going wrong.
find quote
Post Reply