Window focusing Fernetmenta-Master build.
#1
(2014-03-31, 18:46)FernetMenta Wrote:
(2014-03-31, 14:18)Saner Wrote: I remember now why I used the team-xbmc and not fernetmenta-master. on the latter my remote will not work (Flirc) until I force one screen off using


any idea why, and how I can go about fixing this ?

Little off topic but I decided to post an answer here because other flirc users may run into the same problem. Flirc pretends to be a keyboard and an application don't get keyboard events if not focused. Move the mouse pointer into the XBMC window and you'll get the events. For further questions on this please open a separate thread.




Is there any way to make XBMC the focus when it starts, I dont have a mouse connected to the box I use XBMC on, is there any command or setting I can set to make sure it stays as the main focus ?
Reply
#2
What do you do with two monitors and no possibility to focus an a window on the other screen? Can you elaborate on your setup and use case?
Reply
#3
wmctrl -a "XBMC Media Center"
Reply
#4
I have a projector on the other screen and that is only used occasionally, to pull down the screen, fire up the projector just to say "return to TV" to xbmc seems silly. My other option is to restart xbmc whenever I want to use the projector, but that again seems a waste. It used to work fine (I think it was Frodo, I may be wrong) so I may just revert to that.

As I also said I dont have a mouse on my HTPC so I would also need to put a mouse on it, and the wife would end up moaning about "leads"

wsnipex, Thank you.
Reply
#5
Note that it is intended behavior how my branch works. This will be merged into mainline after Gotham release. Flirc might not be the correct device for you then.
Reply
#6
@Saner–I deal with a similar issue myself, and found that the best way is to use LIRC to listen on a port and set up a socket. Not sure if this type of setup is possible with Flirc, as I'm using a PS3 (bluetooth) remote with bdremoteng. Basically the bdremoteng daemon intercepts the keypresses and allocates a port for LIRC to listen to. XBMC then uses the socket set up by LIRC to communicate with the GUI (regardless of XBMC having focus or not). Unsure if Flirc has some kind of software which does something similar.

e.g–

/usr/sbin/lircd -H null --connect 127.0.0.1:8888
chmod 666 /var/run/lirc/lircd
ln -s /var/run/lirc/lircd /dev/lircd
Reply
#7
I can use lirc if needs be (I have a IR receiver), but I will stick with fLIRC for now. I guess I will just stick to manually running a script to set what window I want. This feels like a regression for those of us with two monitors Sad

Anyway, keep up the good work, I am sure there is a good reason for this change. Smile
Reply
#8
There was indeed good reason: fixing multi-monitor setups which is utterly broken in mainline which uses SDL. Look at Linux or Windows and see see that it is common that keyboard input goes to the focused application. If one application grabs the keyboard other applications running on the second monitor can't be controlled.
Reply
#9
Think of an application like a mail client, where you "enter your passwords" and all other windows listen to the input - that would just be insane.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#10
yes, that behavior is default on any linux desktop. Other OSs don't even accept mouse input (e.g. scroll) if the window is not focused.

Imho you can just add that wmctl command to your xbmc start/display switch script and be done with it.
Reply
#11
You can possibly use a separate/dedicated receiver (dongle) just for the remote and assign that device to XBMC (i.e, using the regular mouse & keyboard on the second screen, and the 'isolated' dongle to simply receive IR for XBMC), similar to the way you can assign a bluetooth device for one specific purpose. But it has to be invisible to X, of course, so it doesn't grab it. I assume this will have to be done if one wants for use the new Tivo Slide Pro remote, for instance (which has a USB RF, non-bluetooth dongle included.)

btw. - setting focus with wmctrl obviously works but is not really an option IMO, since as soon as one uses the second screen the focus is pulled away. This would assume that the second screen isn't being used (which kind of defeats the purpose of having a multi-head setup in the first place) Wink

As a side note– although the non-SDL XBMC version in the FernetMenta branch supports multi-head properly (vs. the crippled official XBMC branch), there has apparently also been changes made in both the WMs and Xorg in newer Ubuntu releases (>=13.10) which are impacting the multi-head functionality. I did testing on several systems (Ivy Bridge & Haswell) and the only way I found to run XBMC properly on a 13.10 system was in a separate XBMC session (thus defeating multi-head once again). The Fluxbox session, XFCE4, Gnome sessions etc. all failed to use the second display (despite XBMC thinking it did). The Ubuntu session worked, but only in 60Hz, even with all relevant modelines added to the xorg.conf.
(seems there aren't that many who actually run a true multi-head system, since then these changes would be immediately apparent.)

Sorry for the digression. Smile
Reply
#12
As I said I will just carry on using a script to turn one screen on and the other off, its not a problem as such but I cant be the only person who does not have a mouse attached to his HTPC or uses fLIRC in a multi-monitor setup, I believe fLIRC is quite popular (I at least heard about it from here) - http://xbmc.org/flirc-a-new-old-way-to-control-xbmc/

So saying to a section of us who have multi-monitor setup, with a product that was advertised on the xbmc homepage, "use a mouse" each time xbmc starts seems a backwards step.

But anyway, I dont want to seem like I am bitching, I have used XBMC from its earliest days (back when it was XBMP) and I really do appreciate all the work that is done by all the devs, so I want to end it on that note, thank you for all your hard work!
Reply

Logout Mark Read Team Forum Stats Members Help
Window focusing Fernetmenta-Master build.0