1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

New colormap header file and remove unused functions

The functions related to colormap are moved from funcs.h to the new
file colormap.h. These files are included where needed.

The functions wColormapInstallRoot and wColormapUninstallRoot are
removed, because they are not used.
This commit is contained in:
Rodolfo García Peñas (kix)
2012-06-25 13:29:35 +02:00
committed by Carlos R. Mafra
parent 42cb1291e3
commit 02feb72fdc
8 changed files with 32 additions and 26 deletions

View File

@@ -35,7 +35,7 @@
#include "window.h" #include "window.h"
#include "client.h" #include "client.h"
#include "icon.h" #include "icon.h"
#include "funcs.h" #include "colormap.h"
#include "application.h" #include "application.h"
#include "actions.h" #include "actions.h"
#include "stacking.h" #include "stacking.h"

View File

@@ -37,7 +37,7 @@
#include "actions.h" #include "actions.h"
#include "icon.h" #include "icon.h"
#include "client.h" #include "client.h"
#include "funcs.h" #include "colormap.h"
#include "stacking.h" #include "stacking.h"
#include "appicon.h" #include "appicon.h"
#include "appmenu.h" #include "appmenu.h"

View File

@@ -92,26 +92,6 @@ void wColormapInstallForWindow(WScreen * scr, WWindow * wwin)
XSync(dpy, False); XSync(dpy, False);
} }
void wColormapInstallRoot(WScreen * scr)
{
if (scr->root_colormap_install_count == 0) {
wColormapInstallForWindow(scr, NULL);
scr->original_cmap_window = scr->cmap_window;
}
scr->root_colormap_install_count++;
}
void wColormapUninstallRoot(WScreen * scr)
{
if (scr->root_colormap_install_count > 0)
scr->root_colormap_install_count--;
if (scr->root_colormap_install_count == 0) {
wColormapInstallForWindow(scr, scr->original_cmap_window);
scr->original_cmap_window = NULL;
}
}
void wColormapAllowClientInstallation(WScreen * scr, Bool starting) void wColormapAllowClientInstallation(WScreen * scr, Bool starting)
{ {
scr->flags.colormap_stuff_blocked = starting; scr->flags.colormap_stuff_blocked = starting;

27
src/colormap.h Normal file
View File

@@ -0,0 +1,27 @@
/*
* Window Maker window manager
*
* Copyright (c) 2000-2003 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef WMCOLORMAP_H
#define WMCOLORMAP_H
void wColormapInstallForWindow(WScreen *scr, WWindow *wwin);
void wColormapAllowClientInstallation(WScreen * scr, Bool starting);
#endif /* WMCOLORMAP_H */

View File

@@ -67,6 +67,7 @@
#include "xinerama.h" #include "xinerama.h"
#include "wmspec.h" #include "wmspec.h"
#include "rootmenu.h" #include "rootmenu.h"
#include "colormap.h"
/******** Global Variables **********/ /******** Global Variables **********/
extern XContext wWinContext; extern XContext wWinContext;

View File

@@ -41,10 +41,6 @@ void OpenWindowMenu2(WWindow *wwin, int x, int y, int keyboard);
void OpenMiniwindowMenu(WWindow *wwin, int x, int y); void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
void CloseWindowMenu(WScreen *scr); void CloseWindowMenu(WScreen *scr);
void DestroyWindowMenu(WScreen *scr); void DestroyWindowMenu(WScreen *scr);
void wColormapInstallForWindow(WScreen *scr, WWindow *wwin);
void wColormapInstallRoot(WScreen *scr);
void wColormapUninstallRoot(WScreen *scr);
void wColormapAllowClientInstallation(WScreen *scr, Bool starting);
void PlaceIcon(WScreen *scr, int *x_ret, int *y_ret, int head); void PlaceIcon(WScreen *scr, int *x_ret, int *y_ret, int head);
void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next, Bool class_only); void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next, Bool class_only);
void SendHelperMessage(WScreen *scr, char type, int workspace, char *msg); void SendHelperMessage(WScreen *scr, char type, int workspace, char *msg);

View File

@@ -36,6 +36,7 @@
#include "session.h" #include "session.h"
#include "winspector.h" #include "winspector.h"
#include "wmspec.h" #include "wmspec.h"
#include "colormap.h"
extern Atom _XA_WM_DELETE_WINDOW; extern Atom _XA_WM_DELETE_WINDOW;
extern Time LastTimestamp; extern Time LastTimestamp;

View File

@@ -50,6 +50,7 @@
#include "actions.h" #include "actions.h"
#include "client.h" #include "client.h"
#include "funcs.h" #include "funcs.h"
#include "colormap.h"
#include "keybind.h" #include "keybind.h"
#include "stacking.h" #include "stacking.h"
#include "defaults.h" #include "defaults.h"