[mythtv] [patch] set hint for tv window

Alex Krohn mythtv-dev@snowman.net
Fri, 29 Nov 2002 15:35:00 -0800


Hi,

Below is a quick patch against cvs copy to provide the window name for the tv
window to your window manager. 

This helps, as a lot of window managers can set properties on windows if you
know their name (i.e. open maximized, set location, etc). All the other
windows have names as Qt sets this up for you automatically, but since the tv
is done using X directly, it would be nice if this was set.

Cheers,

Alex

*** MC/libs/libNuppelVideo/XJ.cpp.orig  Fri Nov 29 15:29:32 2002
--- MC/libs/libNuppelVideo/XJ.cpp       Fri Nov 29 14:57:25 2002
***************
*** 60,69 ****
  {
    XWMHints wmhints;
    XTextProperty windowName, iconName;
    int (*old_handler)(Display *, XErrorEvent *);
    int i, ret;
    XJ_caught_error = 0;
!   
    unsigned int p_version, p_release, p_request_base, p_event_base, p_error_base;
    int p_num_adaptors;
  
--- 60,73 ----
  {
    XWMHints wmhints;
    XTextProperty windowName, iconName;
+   XClassHint hint;
    int (*old_handler)(Display *, XErrorEvent *);
    int i, ret;
    XJ_caught_error = 0;
! 
!   hint.res_name = window_name;
!   hint.res_class = window_name;
! 
    unsigned int p_version, p_release, p_request_base, p_event_base, p_error_base;
    int p_num_adaptors;
  
***************
*** 91,96 ****
--- 95,101 ----
    XJ_root=DefaultRootWindow(XJ_disp);
    
    XJ_win=XCreateSimpleWindow(XJ_disp,XJ_root,0,0,XJ_width,XJ_height,0,XJ_white,XJ_black);
+   XSetClassHint(XJ_disp, XJ_win, &hint);
    if(!XJ_win) {  
      printf("create window failed\n");
      return false;