Kodi Community Forum
[PATCH] "Always On Top" option (for Windowed Mode) in XBMC for Windows - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: [PATCH] "Always On Top" option (for Windowed Mode) in XBMC for Windows (/showthread.php?tid=51813)

Pages: 1 2 3 4 5


[PATCH] "Always On Top" option (for Windowed Mode) in XBMC for Windows - CrashX - 2009-05-28

I was trying to watch tv show in xbmc window and surf the internet and noticed that the xbmc window wasn't on top. I have seen this feature as an option in other media players where it will be on top always or while it is playing at least.

If we changed the following in surface.cpp and it will force window to be on top always:
Code:
m_iOnTop = ONTOP_AUTO;
to
m_iOnTop = ONTOP_ALWAYS ;

The only issue is with Alt+Tab, it will ** sometimes ** have minor refresh issue but if you press it again and it will go away.

Is this possible for this to be an option in the gui or have it as advancedsetting option ?

Created a trac with patch .. http://trac.xbmc.org/ticket/6675 ..


- Gamester17 - 2009-05-28

Please submit as a diff patch on trac:
http://wiki.xbmc.org/?title=HOW-TO_submit_a_patch
http://trac.xbmc.org

Yes I think that should be made in to a GUI settings option,

...and no reason why that should be Win32 only, right? Huh


- CrashX - 2009-05-28

You are right it should be for all OS but unfornately the exisiting code for ontop is only for win32.

Another question I have is why do you need to call CSurface::NotifyAppFocusChange(bool bGaining)? It seems to be only for win32 and without it works as expected in window mode and full screen .. It is called when windows loses focus or gains and all we are doing is setting window to be on top or not which windows should do by itself ?


- WiSo - 2009-05-28

It was necessary for either Intel Cards or the alt+tab problem can't remember as Capn Bryn started to redesign the window management and I didn't follow.


- CrashX - 2009-05-28

WiSo:

Are you ok with having it as GUI option to enable always on top ?


- topfs2 - 2009-05-28

This is IMHO not guisettings material, please make the patch advancedsettings.

Cheers,
Tobias


- WiSo - 2009-05-28

I guess I need more votes here Wink
I think too that this belongs to the gui settings. We have a lot of other settings there which could be hidden from the basic users but always on top shouldn't be IMO.
Votes from other devs?


- jmarshall - 2009-05-29

WTF does it even do?


- topfs2 - 2009-05-29

jmarshall Wrote:WTF does it even do?

You keep XBMC always on top when in windowed, so you can surf the web while playing videos Smile I do this myself all the time, but linux have this feature built into window manager instead of each app have to do it.

It's a usefull feature, I just don't see it as a usefull feature for a HTPC applications and personally I think our gui settings should be minimal. And minimal IMHO should only contain settings which actually are usefull for HTPC usage. But so long it's windows only I'm not gonna fight it to the death either Smile

Cheers,
Tobias.


- Gamester17 - 2009-05-29

Topfs2 Wrote:This is IMHO not guisettings material, please make the patch advancedsettings.
Basically all media applications has a "Always On Top" setting available that can be enabled/disabled via their GUI. I think that it is implemented then it should be a GUI setting.

I have to admit though that I have not seen a media center application with this settings, but I guess that anyone wanting this settings is not using XBMC as a dedicated living-room media center but rather a desktop media player.


- topfs2 - 2009-05-29

Gamester17 Wrote:I have to admit though that I have not seen a media center application with this settings, but I guess that anyone wanting this settings is not using XBMC as a dedicated living-room media center but rather a desktop media player.

Yup that was what I was refering, to. As a desktop media player always on top is a great feature, but in HTPC it feels redundant, the entire gui is meant to be the only GUI to that PC, so why would you ever not have it ontop.

I would at most streatch to that this setting could be visible on non-standalone option. i.e when launching XBMC from startmenu instead of xsessions in linux, I still find it redundant though, but for discussions sake Smile


- WiSo - 2009-05-29

Topfs2 Wrote:Yup that was what I was refering, to. As a desktop media player always on top is a great feature, but in HTPC it feels redundant, the entire gui is meant to be the only GUI to that PC, so why would you ever not have it ontop.

Agreed. I also mix media player and media center from time to time.


- CrashX - 2009-05-29

How about I fix it so that when it is playing in window mode, it is on top always but when it is playing full screen, it revert to what it was before ? Is that ok ?


- davilla - 2009-05-29

CrashX Wrote:How about I fix it so that when it is playing in window mode, it is on top always but when it is playing full screen, it revert to what it was before ? Is that ok ?

How about users that don't want it always on top when windowed ?


- CrashX - 2009-05-29

Yup you are right .. I will go with the advancedsettings option ..

Should I fix this for particular surface or for all surfaces? If yes, which one ?