[Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.40,1.41 ws.h,1.14,1.15 wskeys.h,1.2,1.3 wsmkeys.h,1.2,1.3

Zoltan Ponekker pontscho at mplayerhq.hu
Tue May 14 13:41:04 CEST 2002


Update of /cvsroot/mplayer/main/Gui/wm
In directory mail:/var/tmp.root/cvs-serv10582/Gui/wm

Modified Files:
	ws.c ws.h wskeys.h wsmkeys.h 
Log Message:
small fixes

Index: ws.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/ws.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- ws.c	9 May 2002 17:28:09 -0000	1.40
+++ ws.c	14 May 2002 11:41:01 -0000	1.41
@@ -156,6 +156,7 @@
  int             wm = wsWMUnknown;
 
 // --- gnome
+/*
  type=XInternAtom( wsDisplay,"_WIN_SUPPORTING_WM_CHECK",False );
  if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( long ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
   {
@@ -163,7 +164,7 @@
    XFree( args );
    return wsWMGnome;
   }
-
+*/
 // --- net wm
  type=XInternAtom( wsDisplay,"_NET_SUPPORTED",False );
  if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( long ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
@@ -198,6 +199,7 @@
      XFree( name );
     }
  } while( c++ < 25 );
+ XUnmapWindow( wsDisplay,win );
  XDestroyWindow( wsDisplay,win );
 #ifdef MP_DEBUG
  if ( wm == wsWMUnknown ) mp_dbg( MSGT_VO,MSGL_STATUS,"[ws] Unknown wm type...\n" );
@@ -205,6 +207,8 @@
  return wsWMUnknown;
 }
 
+extern int vo_wm_type;
+
 void wsXInit( void* mDisplay )
 {
  int    eventbase;
@@ -256,7 +260,8 @@
  wsMaxX=DisplayWidth( wsDisplay,wsScreen );
  wsMaxY=DisplayHeight( wsDisplay,wsScreen );
 
- wsWMType=wsWindowManagerType();
+ if ( vo_wm_type != -1 ) wsWMType=vo_wm_type;
+   else wsWMType=wsWindowManagerType();
 
  wsGetDepthOnScreen();
 #ifdef DEBUG
@@ -533,7 +538,6 @@
 
 Bool wsEvents( Display * display,XEvent * Event,XPointer arg )
 {
- KeySym        keySym;
  unsigned long i = 0;
  int           l;
  int           x,y;
@@ -613,6 +617,7 @@
         if ( Event->xkey.state & ControlMask ) wsWindowList[l]->Control=1;
         if ( Event->xkey.state & ShiftMask ) wsWindowList[l]->Shift=1;
         if ( Event->xkey.state & LockMask ) wsWindowList[l]->CapsLock=1;
+#if 0
         keySym=XKeycodeToKeysym( wsDisplay,Event->xkey.keycode,0 );
         if ( keySym != NoSymbol )
          {
@@ -621,6 +626,19 @@
           if ( wsWindowList[l]->KeyHandler )
             wsWindowList[l]->KeyHandler( Event->xkey.state,i,keySym );
          }
+#else
+	{
+        	int    		key;
+		char   		buf[100];
+		KeySym 		keySym;
+	 static XComposeStatus  stat;
+
+	 XLookupString( &Event->xkey,buf,sizeof(buf),&keySym,&stat );
+	 key=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) );
+	 wsKeyTable[ key ]=i;
+	 if ( wsWindowList[l]->KeyHandler ) wsWindowList[l]->KeyHandler( Event->xkey.state,i,key );
+	}
+#endif
         break;
 
    case MotionNotify:  i=wsMoveMouse;                 goto buttonreleased;

Index: ws.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/ws.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ws.h	6 May 2002 15:05:06 -0000	1.14
+++ ws.h	14 May 2002 11:41:01 -0000	1.15
@@ -87,14 +87,11 @@
 #define wsPVisible   5
 #define wsRolled     6
 
-#define wsWMWMW      0
-#define wsWMUnknown  1
-#define wsWMNetWM    2
-#define wsWMKDE      3
-#define wsWMIceWM    4
-#define wsWMBlackBox 5
-#define wsWMGnome    6
-#define wsWMWMaker   7
+#define wsWMUnknown  0
+#define wsWMNetWM    1
+#define wsWMKDE      2
+#define wsWMIceWM    3
+#define wsWMWMaker   4
 
 #define wsParamDisplay Display *dpy,Window w
 

Index: wskeys.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/wskeys.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- wskeys.h	29 Jan 2002 16:35:53 -0000	1.2
+++ wskeys.h	14 May 2002 11:41:01 -0000	1.3
@@ -6,8 +6,6 @@
 
 #define wsosbrackets '['
 #define wscsbrackets ']'
-#define wsomore      '<'
-#define wscmore      '>'
 
 #define wsq 'q'
 #define wsa 'a'
@@ -75,6 +73,12 @@
 #define ws9 '9'
 
 #define wsSpace ' '
+#define wsMinus '-'
+#define wsPlus  '+'
+#define wsMul   '*'
+#define wsDiv   '/'
+#define wsLess  '<'
+#define wsMore  '>'
 
 #define wsUp            0x52 + 256
 #define wsDown          0x54 + 256
@@ -137,7 +141,7 @@
 #define wsXF86Next        0x17 + 256
 #define wsXF86Media       0x32 + 256
 
-#define wsKeyNumber 124
+#define wsKeyNumber 128
 
 typedef struct
 {

Index: wsmkeys.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/wsmkeys.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- wsmkeys.h	29 Jan 2002 16:35:53 -0000	1.2
+++ wsmkeys.h	14 May 2002 11:41:01 -0000	1.3
@@ -34,7 +34,9 @@
   { wsEnd,             "End" }, { wsEscape,       "Escape" },
 
   { wsosbrackets, "[" }, { wscsbrackets, "]" },
-  { wsomore,      "<" }, { wscmore,      ">" },
+  { wsMore,       "<" }, { wsLess,       ">" },
+  { wsMinus,	  "-" }, { wsPlus,  	 "+" },
+  { wsMul,	  "*" }, { wsDiv,	 "/" },
 
   { ws0, "0" }, { ws1, "1" }, { ws2, "2" }, { ws3, "3" }, { ws4, "4" },
   { ws5, "5" }, { ws6, "6" }, { ws7, "7" }, { ws8, "8" }, { ws9, "9" },




More information about the MPlayer-cvslog mailing list