changeset 35683:75155d8a9c7e

Remove parameter for border_width from wsWindowCreate(). It's nothing but 0 anyway. Additionally, switch position of mouse cursor and window properties parameters.
author ib
date Fri, 18 Jan 2013 01:13:50 +0000
parents fcb8f12cefa7
children 7801d585b06c
files gui/interface.c gui/ui/actions.c gui/ui/menu.c gui/ui/playbar.c gui/wm/ws.c gui/wm/ws.h
diffstat 6 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Fri Jan 18 00:48:26 2013 +0000
+++ b/gui/interface.c	Fri Jan 18 01:13:50 2013 +0000
@@ -172,7 +172,7 @@
     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 @@
 // 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);
 
--- a/gui/ui/actions.c	Fri Jan 18 00:48:26 2013 +0000
+++ b/gui/ui/actions.c	Fri Jan 18 01:13:50 2013 +0000
@@ -232,7 +232,7 @@
 
     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);
--- a/gui/ui/menu.c	Fri Jan 18 00:48:26 2013 +0000
+++ b/gui/ui/menu.c	Fri Jan 18 01:13:50 2013 +0000
@@ -160,7 +160,7 @@
 
  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 );
 
--- a/gui/ui/playbar.c	Fri Jan 18 00:48:26 2013 +0000
+++ b/gui/ui/playbar.c	Fri Jan 18 01:13:50 2013 +0000
@@ -259,7 +259,7 @@
  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 );
 
--- a/gui/wm/ws.c	Fri Jan 18 00:48:26 2013 +0000
+++ b/gui/wm/ws.c	Fri Jan 18 01:13:50 2013 +0000
@@ -829,11 +829,10 @@
 //  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 @@
     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 @@
 
     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,
--- a/gui/wm/ws.h	Fri Jan 18 00:48:26 2013 +0000
+++ b/gui/wm/ws.h	Fri Jan 18 01:13:50 2013 +0000
@@ -106,7 +106,6 @@
     int OldX, OldY, OldWidth, OldHeight;
     int MaxX, MaxY;
     int isFullScreen;
-    int BorderWidth;
     int Property;
     unsigned char *bImage;
     XImage *xImage;
@@ -179,7 +178,7 @@
 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);