mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18:06 +01:00
wmaker: remove one level of pointers for the function SlideWindows
The function does not need to be passed a array of pointer to windows because it does not change content of the pointers. It is more efficient to directly use an array of windows as the parameter, and simpler also. As 'SlideWindow' is also concerned, it can be simplified and turned into an inlinable function so the compiler can optimise it. Took opportunity to de-CamelCase the name of the functions to comply with the project's coding style. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
8fa16bef00
commit
784f6794e5
@@ -96,17 +96,17 @@ void wWorkspaceMapUpdate(WScreen *scr)
|
||||
static void workspace_map_slide(WWorkspaceMap *wsmap)
|
||||
{
|
||||
if (wsmap->edge == WD_TOP)
|
||||
SlideWindow(WMWidgetXID(wsmap->win), 0, -1 * wsmap->wsheight, wsmap->xcount, wsmap->ycount);
|
||||
slide_window(WMWidgetXID(wsmap->win), 0, -1 * wsmap->wsheight, wsmap->xcount, wsmap->ycount);
|
||||
else
|
||||
SlideWindow(WMWidgetXID(wsmap->win), 0, wsmap->scr->scr_height, wsmap->xcount, wsmap->ycount);
|
||||
slide_window(WMWidgetXID(wsmap->win), 0, wsmap->scr->scr_height, wsmap->xcount, wsmap->ycount);
|
||||
}
|
||||
|
||||
static void workspace_map_unslide(WWorkspaceMap *wsmap)
|
||||
{
|
||||
if (wsmap->edge == WD_TOP)
|
||||
SlideWindow(WMWidgetXID(wsmap->win), wsmap->xcount, wsmap->ycount, 0, -1 * wsmap->wsheight);
|
||||
slide_window(WMWidgetXID(wsmap->win), wsmap->xcount, wsmap->ycount, 0, -1 * wsmap->wsheight);
|
||||
else
|
||||
SlideWindow(WMWidgetXID(wsmap->win), wsmap->xcount, wsmap->ycount, 0, wsmap->scr->scr_height);
|
||||
slide_window(WMWidgetXID(wsmap->win), wsmap->xcount, wsmap->ycount, 0, wsmap->scr->scr_height);
|
||||
}
|
||||
|
||||
static void workspace_map_destroy(WWorkspaceMap *wsmap)
|
||||
|
||||
Reference in New Issue
Block a user