[MPlayer-cvslog] r35777 - in trunk/gui: interface.c ui/actions.c ui/menu.c ui/playbar.c wm/ws.c wm/ws.h

ib subversion at mplayerhq.hu
Fri Jan 18 02:13:50 CET 2013


Author: ib
Date: Fri Jan 18 02:13:50 2013
New Revision: 35777

Log:
Remove parameter for border_width from wsWindowCreate().

It's nothing but 0 anyway.

Additionally, switch position of mouse cursor and window properties
parameters.

Modified:
   trunk/gui/interface.c
   trunk/gui/ui/actions.c
   trunk/gui/ui/menu.c
   trunk/gui/ui/playbar.c
   trunk/gui/wm/ws.c
   trunk/gui/wm/ws.h

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Fri Jan 18 01:48:26 2013	(r35776)
+++ trunk/gui/interface.c	Fri Jan 18 02:13:50 2013	(r35777)
@@ -172,7 +172,7 @@ void guiInit(void)
     if (guiWinID >= 0)
         guiApp.mainWindow.Parent = guiWinID;
 
-    wsWindowCreate(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, 0, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow | wsWaitMap | wsAspect, "MPlayer - Video");
+    wsWindowCreate(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsShowFrame | wsHideWindow | wsWaitMap | wsAspect, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer - Video");
     wsImageDestroy(&guiApp.videoWindow);
     wsImageCreate(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
     wsXDNDMakeAwareness(&guiApp.videoWindow);
@@ -185,7 +185,7 @@ void guiInit(void)
 // i=wsHideFrame|wsMaxSize|wsHideWindow;
 // if ( guiApp.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow;
     i = wsShowFrame | wsMinSize | wsMaxSize | wsHideWindow;
-    wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, 0, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, i, "MPlayer");
+    wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, i, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer");
     wsWindowShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
     wsXDNDMakeAwareness(&guiApp.mainWindow);
 

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Fri Jan 18 01:48:26 2013	(r35776)
+++ trunk/gui/ui/actions.c	Fri Jan 18 02:13:50 2013	(r35777)
@@ -232,7 +232,7 @@ void uiChangeSkin(char *name)
 
     wsWindowDestroy(&guiApp.mainWindow);
 
-    wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, 0, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsMinSize | wsMaxSize | wsHideWindow, "MPlayer");
+    wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, wsShowFrame | wsMinSize | wsMaxSize | wsHideWindow, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer");
     wsImageCreate(&guiApp.mainWindow, guiApp.main.Bitmap.Width, guiApp.main.Bitmap.Height);
     wsWindowShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
     wsWindowIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);

Modified: trunk/gui/ui/menu.c
==============================================================================
--- trunk/gui/ui/menu.c	Fri Jan 18 01:48:26 2013	(r35776)
+++ trunk/gui/ui/menu.c	Fri Jan 18 02:13:50 2013	(r35777)
@@ -160,7 +160,7 @@ void uiMenuInit( void )
 
  wsWindowCreate( &guiApp.menuWindow,
  guiApp.menu.x,guiApp.menu.y,guiApp.menu.width,guiApp.menu.height,
- 0,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsOverredirect|wsHideFrame|wsMaxSize|wsMinSize|wsHideWindow,"MPlayer menu" );
+ wsOverredirect|wsHideFrame|wsMaxSize|wsMinSize|wsHideWindow,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,"MPlayer menu" );
 
  wsWindowShape( &guiApp.menuWindow,guiApp.menu.Mask.Image );
 

Modified: trunk/gui/ui/playbar.c
==============================================================================
--- trunk/gui/ui/playbar.c	Fri Jan 18 01:48:26 2013	(r35776)
+++ trunk/gui/ui/playbar.c	Fri Jan 18 02:13:50 2013	(r35777)
@@ -259,7 +259,7 @@ void uiPlaybarInit( void )
  guiApp.playbarWindow.Parent=guiApp.videoWindow.WindowID;
  wsWindowCreate( &guiApp.playbarWindow,
    guiApp.playbar.x,guiApp.playbar.y,guiApp.playbar.width,guiApp.playbar.height,
-   0,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsHideWindow,"PlayBar" );
+   wsHideFrame|wsHideWindow,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,"PlayBar" );
 
  wsWindowShape( &guiApp.playbarWindow,guiApp.playbar.Mask.Image );
 

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Fri Jan 18 01:48:26 2013	(r35776)
+++ trunk/gui/wm/ws.c	Fri Jan 18 02:13:50 2013	(r35777)
@@ -829,11 +829,10 @@ Window LeaderWindow;
 //  wsWindowCreate: create a new window on the screen.
 //   x,y   : window position
 //   w,h   : window size
-//   b     : window border size
 //   c     : mouse cursor visible
 //   p     : properties - "decoration", visible titlebar, etc ...
 // ----------------------------------------------------------------------------------------------
-void wsWindowCreate(wsWindow *win, int x, int y, int w, int h, int b, int c, unsigned char p, char *label)
+void wsWindowCreate(wsWindow *win, int x, int y, int w, int h, unsigned char p, int c, char *label)
 {
     int depth;
 
@@ -851,8 +850,6 @@ void wsWindowCreate(wsWindow *win, int x
     win->OldWidth  = win->Width;
     win->OldHeight = win->Height;
 
-/* Border size for window. */
-    win->BorderWidth = b;
 /* Hide Mouse Cursor */
     win->wsCursor = None;
     win->wsMouseEventType = c;
@@ -911,7 +908,7 @@ void wsWindowCreate(wsWindow *win, int x
 
     win->WindowID = XCreateWindow(wsDisplay,
                                   (win->Parent != 0 ? win->Parent : wsRootWin),
-                                  win->X, win->Y, win->Width, win->Height, win->BorderWidth,
+                                  win->X, win->Y, win->Width, win->Height, 0,
                                   win->VisualInfo.depth,
                                   InputOutput,
                                   win->VisualInfo.visual,

Modified: trunk/gui/wm/ws.h
==============================================================================
--- trunk/gui/wm/ws.h	Fri Jan 18 01:48:26 2013	(r35776)
+++ trunk/gui/wm/ws.h	Fri Jan 18 02:13:50 2013	(r35777)
@@ -106,7 +106,6 @@ typedef struct {
     int OldX, OldY, OldWidth, OldHeight;
     int MaxX, MaxY;
     int isFullScreen;
-    int BorderWidth;
     int Property;
     unsigned char *bImage;
     XImage *xImage;
@@ -179,7 +178,7 @@ void wsMouseAutohide(void);
 void wsEvent(XEvent *event);
 void wsEvents(void);
 
-void wsWindowCreate(wsWindow *win, int x, int y, int w, int h, int b, int c, unsigned char p, char *label);
+void wsWindowCreate(wsWindow *win, int x, int y, int w, int h, unsigned char p, int c, char *label);
 void wsWindowDestroy(wsWindow *win);
 void wsWindowMove(wsWindow *win, Bool abs, int x, int y);
 void wsWindowMoveWithin(wsWindow *win, Bool abs, int x, int y);


More information about the MPlayer-cvslog mailing list