Quote:
Originally Posted by dima_tr
Hm, has just found one thing that may serve as a substitute for
..............const int xid = GDK_WINDOW_XID(window->window);
Guys, can you please check if this helps rxvt to have a tab?
Code:
Window focusWindow;
Display *focusDisplay = XOpenDisplay(NULL);
int param = 0;
int xid = XGetInputFocus(focusDisplay,&focusWindow,¶m);
|
Hi dima,
Thanks for 'inspiring' me, to fix this issue that also annoyed me for some time. The xid is already available, my main function now contains:
Code:
// make sure that rxvt is shown in a tab
ipc_set_services();
ipc_sys_startup_complete(rxvt_vars->TermWin.parent[0]);
rxvt_main_loop(rxvt_vars); /* main processing loop */
The keyboard is still displayed when switching to other applications, but that will not be a big problem I hope. To make this work I also had to change the code to remove the keyboard. When calling eripc_sysd_startup_complete() to show the application in the taskbar, sysd checks to see if the process-id that is given as parameter is equal to one of the processes that is started from the UI. The original code was using a shell-script to start the real rxvt-program, so the pid of the program started, did not match with the pid of the process calling startup_complete().
I modified the code slightly to close the keyboard when the program exits, so I do not need the shell-script anymore.
I see if I can make a proper 'installation package' and post it in the original rxvt message thread.