[MPlayer-cvslog] r34081 - in trunk/gui: interface.c ui/actions.c ui/main.c ui/menu.c ui/playbar.c ui/sub.c wm/ws.c wm/ws.h
ib
subversion at mplayerhq.hu
Thu Sep 8 13:11:02 CEST 2011
Author: ib
Date: Thu Sep 8 13:11:02 2011
New Revision: 34081
Log:
Change parameter b of wsMoveWindow().
Make it Bool, rename it abs and reverse its meaning. The parameter now
indicates whether x and y shall be handled as real, absolute position
values or as possibly mock ones.
Modified:
trunk/gui/interface.c
trunk/gui/ui/actions.c
trunk/gui/ui/main.c
trunk/gui/ui/menu.c
trunk/gui/ui/playbar.c
trunk/gui/ui/sub.c
trunk/gui/wm/ws.c
trunk/gui/wm/ws.h
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Thu Sep 8 12:43:11 2011 (r34080)
+++ trunk/gui/interface.c Thu Sep 8 13:11:02 2011 (r34081)
@@ -742,7 +742,7 @@ int gui(int what, void *data)
if (!guiApp.subWindow.isFullScreen)
wsResizeWindow(&guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight);
- wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y);
+ wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y);
if (!guiApp.subWindow.Mapped)
wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
@@ -752,7 +752,7 @@ int gui(int what, void *data)
uiEventHandling(evFullScreen, 0);
if (guiWinID >= 0)
- wsMoveWindow(&guiApp.mainWindow, False, 0, guiInfo.VideoHeight);
+ wsMoveWindow(&guiApp.mainWindow, True, 0, guiInfo.VideoHeight);
break;
@@ -797,7 +797,7 @@ int gui(int what, void *data)
if (!guiApp.subWindow.isFullScreen) {
wsResizeWindow(&guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight);
- wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y);
+ wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y);
}
if (!guiApp.subWindow.Mapped)
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Thu Sep 8 12:43:11 2011 (r34080)
+++ trunk/gui/ui/actions.c Thu Sep 8 13:11:02 2011 (r34081)
@@ -160,7 +160,7 @@ void uiChangeSkin(char *name)
if (!guiApp.subWindow.isFullScreen && !guiInfo.Playing) {
wsResizeWindow(&guiApp.subWindow, guiApp.sub.width, guiApp.sub.height);
- wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y);
+ wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y);
}
if (guiApp.sub.Bitmap.Image)
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Thu Sep 8 12:43:11 2011 (r34080)
+++ trunk/gui/ui/main.c Thu Sep 8 13:11:02 2011 (r34081)
@@ -338,7 +338,7 @@ set_volume:
uiFullScreen();
}
wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 );
- wsMoveWindow( &guiApp.subWindow, False,
+ wsMoveWindow( &guiApp.subWindow, True,
( wsMaxX - guiInfo.VideoWidth/2 )/2 + wsOrgX,
( wsMaxY - guiInfo.VideoHeight/2 )/2 + wsOrgY );
btnSet( evFullScreen,btnReleased );
@@ -352,7 +352,7 @@ set_volume:
uiFullScreen();
}
wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 );
- wsMoveWindow( &guiApp.subWindow, False,
+ wsMoveWindow( &guiApp.subWindow, True,
( wsMaxX - guiInfo.VideoWidth*2 )/2 + wsOrgX,
( wsMaxY - guiInfo.VideoHeight*2 )/2 + wsOrgY );
btnSet( evFullScreen,btnReleased );
@@ -366,7 +366,7 @@ set_volume:
uiFullScreen();
}
wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
- wsMoveWindow( &guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y );
+ wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y );
btnSet( evFullScreen,btnReleased );
break;
} else if ( !guiApp.subWindow.isFullScreen ) break;
@@ -377,7 +377,7 @@ set_volume:
if ( !guiApp.subWindow.isFullScreen )
{
wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
- wsMoveWindow( &guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y );
+ wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y );
}
}
if ( guiApp.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
@@ -523,7 +523,7 @@ rollerhandled:
switch ( itemtype )
{
case itPLMButton:
- wsMoveWindow( &guiApp.mainWindow,False,RX - abs( sx ),RY - abs( sy ) );
+ wsMoveWindow( &guiApp.mainWindow,True,RX - abs( sx ),RY - abs( sy ) );
uiMainRender=0;
break;
case itPRMButton:
Modified: trunk/gui/ui/menu.c
==============================================================================
--- trunk/gui/ui/menu.c Thu Sep 8 12:43:11 2011 (r34080)
+++ trunk/gui/ui/menu.c Thu Sep 8 13:11:02 2011 (r34081)
@@ -107,7 +107,7 @@ void uiShowMenu( int mx,int my )
menuItem = 0;
- wsMoveWindow( &guiApp.menuWindow,False,x,y );
+ wsMoveWindow( &guiApp.menuWindow,True,x,y );
wsRaiseWindowTop( wsDisplay,guiApp.menuWindow.WindowID );
wsSetLayer( wsDisplay,guiApp.menuWindow.WindowID,1 );
menuRender=1;
Modified: trunk/gui/ui/playbar.c
==============================================================================
--- trunk/gui/ui/playbar.c Thu Sep 8 12:43:11 2011 (r34080)
+++ trunk/gui/ui/playbar.c Thu Sep 8 13:11:02 2011 (r34081)
@@ -83,7 +83,7 @@ static void uiPlaybarDraw( void )
uiPlaybarFade=0;
vo_mouse_autohide=0;
}
- wsMoveWindow( &guiApp.playbarWindow,False,x,playbarLength );
+ wsMoveWindow( &guiApp.playbarWindow,True,x,playbarLength );
break;
case 2: // fade out
playbarLength+=10;
@@ -95,7 +95,7 @@ static void uiPlaybarDraw( void )
wsVisibleWindow( &guiApp.playbarWindow,wsHideWindow );
return;
}
- wsMoveWindow( &guiApp.playbarWindow,False,x,playbarLength );
+ wsMoveWindow( &guiApp.playbarWindow,True,x,playbarLength );
break;
}
Modified: trunk/gui/ui/sub.c
==============================================================================
--- trunk/gui/ui/sub.c Thu Sep 8 12:43:11 2011 (r34080)
+++ trunk/gui/ui/sub.c Thu Sep 8 13:11:02 2011 (r34081)
@@ -87,7 +87,7 @@ void uiSubMouseHandle( int Button,int X,
mplSubMoved=1;
if ( !guiApp.subWindow.isFullScreen )
{
- wsMoveWindow( &guiApp.subWindow,False,RX - sx,RY - sy );
+ wsMoveWindow( &guiApp.subWindow,True,RX - sx,RY - sy );
guiApp.sub.x = guiApp.subWindow.X;
guiApp.sub.y = guiApp.subWindow.Y;
// NOTE TO MYSELF: dragging the title bar goes unnoticed?
Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c Thu Sep 8 12:43:11 2011 (r34080)
+++ trunk/gui/wm/ws.c Thu Sep 8 13:11:02 2011 (r34081)
@@ -1042,9 +1042,12 @@ void wsPutImage(wsTWindow *win)
// ----------------------------------------------------------------------------------------------
// Move window to x, y.
// ----------------------------------------------------------------------------------------------
-void wsMoveWindow(wsTWindow *win, int b, int x, int y)
+void wsMoveWindow(wsTWindow *win, Bool abs, int x, int y)
{
- if (b) {
+ if (abs) {
+ win->X = x;
+ win->Y = y;
+ } else {
switch (x) {
case -1:
win->X = (wsMaxX / 2) - (win->Width / 2) + wsOrgX;
@@ -1072,9 +1075,6 @@ void wsMoveWindow(wsTWindow *win, int b,
win->Y = y;
break;
}
- } else {
- win->X = x;
- win->Y = y;
}
win->SizeHint.flags = PPosition | PWinGravity;
Modified: trunk/gui/wm/ws.h
==============================================================================
--- trunk/gui/wm/ws.h Thu Sep 8 12:43:11 2011 (r34080)
+++ trunk/gui/wm/ws.h Thu Sep 8 13:11:02 2011 (r34081)
@@ -229,7 +229,7 @@ void wsHandleEvents(void);
// ----------------------------------------------------------------------------------------------
void wsCreateWindow(wsTWindow *win, int X, int Y, int wX, int hY, int bW, int cV, unsigned char D, char *label);
void wsDestroyWindow(wsTWindow *win);
-void wsMoveWindow(wsTWindow *win, int b, int x, int y);
+void wsMoveWindow(wsTWindow *win, Bool abs, int x, int y);
void wsResizeWindow(wsTWindow *win, int sx, int sy);
void wsIconify(wsTWindow win);
void wsRaiseWindowTop(Display *dsp, Window win);
More information about the MPlayer-cvslog
mailing list