External players do not gain the focus against XBMC, even if XBMC runs in windowed mode
Jester is programming very hard to fix this - but he is a win32 programmer so he suggested to open a new thread in the XBMC for Mac forum section for this one.
First of all, the current sources (build 17061) with the new patch (http://trac.xbmc.orgk/ticket/5656), which should fix the focus issue, are building well on Mac OS X 10.5.6.
Unfortunately the patch does not fix the focus issue on OSX. Jester said, the focus is currently on win32...
As I have no idea how to implement this for Mac OS X, I ask here, what to do to make this work.
tvont
Senior Member Posts: 107 Joined: Oct 2008 Reputation: 0 |
2009-01-13 22:10
Post: #1
(This post was last modified: 2009-01-14 12:48 by Gamester17.)
|
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,564 Joined: Oct 2003 Reputation: 138 |
2009-01-13 23:44
Post: #2
This is because those extra settings are applied only on win32. No such thing has yet been implemented on other platforms.
Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
tvont
Senior Member Posts: 107 Joined: Oct 2008 Reputation: 0 |
2009-01-14 00:34
Post: #3
jmarshall Wrote:This is because those extra settings are applied only on win32. No such thing has yet been implemented on other platforms. Could you give me a hint on which files I have to work on? Thanks |
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,564 Joined: Oct 2003 Reputation: 138 |
2009-01-14 00:43
Post: #4
xbmc/cores/ExternalPlayer/ExternalPlayer.cpp
It's the linux run command you have to work on. Compare with the win32 one. Cheers, Jonathan Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
Gamester17
Team-XBMC Forum Moderator Joined: Sep 2003 Reputation: 9 Location: Sweden |
2009-01-14 13:01
Post: #5
You might also get some ideas on how to launch unix apps (like in Linux and Mac) from looking at the code inside the Launcher python script => http://forum.xbmc.org/showthread.php?tid=35739
In addition, there where as well some older discussion about launching unix apps here => http://forum.xbmc.org/showthread.php?tid=30659 Happy coding!
Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. |
| find quote |
tvont
Senior Member Posts: 107 Joined: Oct 2008 Reputation: 0 |
2009-01-15 00:44
Post: #6
Gamester17 Wrote:You might also get some ideas on how to launch unix apps (like in Linux and Mac) from looking at the code inside the Launcher python script => http://forum.xbmc.org/showthread.php?tid=35739 Thanks Gamester & Jmarshall, will do my best...but I have very little experience with that. And not that much time... |
| find quote |
jeremyhu
Junior Member Posts: 34 Joined: Jan 2009 Reputation: 0 |
2009-01-17 10:28
Post: #7
The external player should themselves claim focus, but you can force this if they don't by doing:
SetFrontProcess(&psn); where psn is a ProcessSerialNumber for the app you want to take focus. If you just have the PID, you want to do: Code: void SetPIDFrontProcess(pid_t pid) { |
| find quote |
tvont
Senior Member Posts: 107 Joined: Oct 2008 Reputation: 0 |
2009-01-18 13:47
Post: #8
jeremyhu Wrote:The external player should themselves claim focus, but you can force this if they don't by doing: Many thanks! I really feel somekind of desperate as I am not a programmer, even if I can find mistakes in written code...sometimes. Maybe if you can also tell me on how to get the pid of the launched player, I could implement this into ExternalPlayer.cpp |
| find quote |
jeremyhu
Junior Member Posts: 34 Joined: Jan 2009 Reputation: 0 |
2009-02-15 12:20
Post: #9
tvont Wrote:Many thanks! Sorry, been away for a bit... I haven't looked at the code myself, but there should be a fork() somewhere before the exec() that launches the external player. The fork() returns the pid_t. |
| find quote |
tvont
Senior Member Posts: 107 Joined: Oct 2008 Reputation: 0 |
2009-04-07 21:39
Post: #10
Thanks, jeremyhu, but: currently I am stuck here.
Could it be that the focus issue is an issue of XBMC itself? I mean, i can give any "force on top" parameter to any external player - xbmc still occupies the topmost focus, also while beeing windowed. as far as I know the windowmanagement of an application should release the focus if another application puts itsself on top. If this issue is resolved there are no more focus probs anymore. Could someone help here, please? Many thanks in advance!
(This post was last modified: 2009-04-07 21:43 by tvont.)
|
| find quote |

![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)
Search
Help