Mercurial > mplayer.hg
changeset 35697:13f8a04c5524
Remove redundant parameter from function.
This information is part of the wsWindow structure.
author | ib |
---|---|
date | Sat, 19 Jan 2013 12:45:14 +0000 |
parents | 2d3b65e5ae1a |
children | e44757ea8f94 |
files | gui/interface.c gui/ui/actions.c gui/wm/ws.c gui/wm/ws.h |
diffstat | 4 files changed, 10 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Sat Jan 19 12:16:50 2013 +0000 +++ b/gui/interface.c Sat Jan 19 12:45:14 2013 +0000 @@ -184,7 +184,7 @@ // i=wsHideFrame|wsMaxSize|wsHideWindow; // if ( guiApp.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow; - i = wsShowFrame | wsMinSize | wsMaxSize | wsHideWindow; + i = (guiApp.mainDecoration ? wsShowFrame : 0) | wsMinSize | wsMaxSize | wsHideWindow; 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); @@ -215,9 +215,6 @@ wsWindowIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon); wsWindowIcon(wsDisplay, guiApp.videoWindow.WindowID, &guiIcon); - if (!guiApp.mainDecoration) - wsWindowDecoration(&guiApp.mainWindow, False); - wsWindowVisibility(&guiApp.mainWindow, wsShowWindow); if (gtkShowVideoWindow) {
--- a/gui/ui/actions.c Sat Jan 19 12:16:50 2013 +0000 +++ b/gui/ui/actions.c Sat Jan 19 12:45:14 2013 +0000 @@ -232,7 +232,7 @@ wsWindowDestroy(&guiApp.mainWindow); - wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, wsShowFrame | wsMinSize | wsMaxSize | wsHideWindow, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer"); + wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, (guiApp.mainDecoration ? wsShowFrame : 0) | 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); @@ -244,9 +244,6 @@ wsXDNDMakeAwareness(&guiApp.mainWindow); - if (!guiApp.mainDecoration) - wsWindowDecoration(&guiApp.mainWindow, False); - wsWindowVisibility(&guiApp.mainWindow, wsShowWindow); mainVisible = True;
--- a/gui/wm/ws.c Sat Jan 19 12:16:50 2013 +0000 +++ b/gui/wm/ws.c Sat Jan 19 12:45:14 2013 +0000 @@ -828,8 +828,7 @@ win->Property = p; - if (p & wsShowFrame) - win->Decoration = True; + win->Decoration = ((p & wsShowFrame) != 0); wsWindowUpdatePosition(win, x, y, w, h); @@ -916,7 +915,7 @@ win->WMHints.initial_state = NormalState; XSetWMHints(wsDisplay, win->WindowID, &win->WMHints); - wsWindowDecoration(win, win->Decoration); + wsWindowDecoration(win); XStoreName(wsDisplay, win->WindowID, label); XmbSetWMProperties(wsDisplay, win->WindowID, label, label, NULL, 0, NULL, NULL, NULL); @@ -1002,7 +1001,7 @@ #endif } -void wsWindowDecoration(wsWindow *win, Bool decor) +void wsWindowDecoration(wsWindow *win) { Atom wsMotifHints; struct { @@ -1021,7 +1020,7 @@ memset(&wsMotifWmHints, 0, sizeof(wsMotifWmHints)); wsMotifWmHints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; - if (decor) { + if (win->Decoration) { wsMotifWmHints.functions = MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE; if (!(win->Property & wsMinSize) || !(win->Property & wsMaxSize)) @@ -1254,8 +1253,10 @@ /* restore window if window manager doesn't support EWMH */ if (!(vo_fs_type & vo_wm_FULLSCREEN)) { + if (!win->isFullScreen) + wsWindowDecoration(win); + wsSizeHint(win); - wsWindowDecoration(win, win->Decoration && !win->isFullScreen); wsWindowLayer(wsDisplay, win->WindowID, win->isFullScreen); XMoveResizeWindow(wsDisplay, win->WindowID, win->X, win->Y, win->Width, win->Height); }
--- a/gui/wm/ws.h Sat Jan 19 12:16:50 2013 +0000 +++ b/gui/wm/ws.h Sat Jan 19 12:45:14 2013 +0000 @@ -182,7 +182,7 @@ void wsWindowBackground(wsWindow *win, int r, int g, int b); void wsWindowClear(wsWindow *win); void wsWindowVisibility(wsWindow *win, int vis); -void wsWindowDecoration(wsWindow *win, Bool decor); +void wsWindowDecoration(wsWindow *win); void wsWindowLayer(Display *display, Window Win, Bool fullscreen); void wsWindowFullscreen(wsWindow *win); void wsWindowRedraw(wsWindow *win);