On Sat, 2009-02-21 at 03:46 -0800, Luke Iannini wrote: > Yo - anyone have any ideas on getting the focus state of a window in > Pd? I want to only enable key commands when the relevant window is > focused - I have lots of miniature applications and it makes much more > sense to treat them independently - I think the global nature of > keystroke handling is what keeps me from every really using it! > > (And, I know [tot] can tell me when a window is focused, but not when > it's unfocused, meaning I'd need a [tot] in every single window. no > good)
another approach would be to control from pd, which window is in focus by using 'vis' messages sent to canvasses. you could implement some keystrokes to navigate through all available windows. this way you wouldn't have to leave the keyboard for switching between windows and compared to the built-in window switcher of your window manager, it has some advantages: a) you can access pd windows, that weren't already open; b) you can design it for your particular needs, so that only pd windows can be accessed, that are meant to be accessed. then you only need to route the key messages to the window, that last received the 'vis 1' message. this is not exactly what you asked for, but i hope it is useful for you anway. roman ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list