From 04cd2fd14c6f45f61457e034906f630ce46a76cc Mon Sep 17 00:00:00 2001 From: Mathias Gumz <akira at fluxbox dot org> Date: Sun, 30 Dec 2007 16:32:53 +0100 Subject: removed some unneeded headers --- src/ArrowButton.hh | 2 +- src/AtomHandler.hh | 6 +++--- src/ButtonTool.cc | 3 +-- src/ClientPattern.hh | 3 +-- src/ClockTool.cc | 25 ++++++++++++------------- src/ClockTool.hh | 4 +--- src/CurrentWindowCmd.cc | 3 --- src/CurrentWindowCmd.hh | 2 +- src/FbAtoms.cc | 2 +- src/FbCommands.hh | 7 ++----- src/FbMenu.hh | 4 ++-- src/FbRootWindow.cc | 2 +- src/FbTk/App.cc | 2 -- src/FbTk/Button.hh | 6 ++---- src/FbTk/EventManager.hh | 2 +- src/FbTk/FbDrawable.cc | 28 ++++++++++++++-------------- src/FbTk/FbDrawable.hh | 2 +- src/FbTk/FbPixmap.hh | 2 -- src/FbTk/FbString.cc | 10 +++------- src/FbTk/FbWindow.hh | 7 +++---- src/FbTk/FileUtil.hh | 8 ++++---- src/FbTk/Font.hh | 8 ++++---- src/FbTk/GContext.cc | 6 +++--- src/FbTk/GContext.hh | 2 -- src/FbTk/Image.hh | 8 ++++---- src/FbTk/ImageControl.hh | 1 - src/FbTk/IntMenuItem.hh | 2 -- src/FbTk/MacroCommand.cc | 1 - src/FbTk/Menu.hh | 8 +++----- src/FbTk/MenuSeparator.cc | 4 ++-- src/FbTk/MenuSeparator.hh | 4 ++-- src/FbTk/ObjectRegistry.hh | 1 - src/FbTk/RegExp.cc | 1 - src/FbTk/Shape.hh | 1 - src/FbTk/Theme.hh | 6 +++--- src/FbTk/TypeAhead.hh | 1 - src/FbTk/XFontImp.hh | 2 -- src/FbTk/XLayer.hh | 2 +- src/FbTk/XftFontImp.hh | 4 ++-- src/FbTk/XmbFontImp.cc | 2 -- src/FbTk/XmbFontImp.hh | 2 -- src/FbWinFrame.cc | 6 +++--- src/FbWinFrame.hh | 2 -- src/Gnome.cc | 5 ++--- src/Gnome.hh | 6 +++--- src/HeadArea.hh | 5 ++--- src/IconButton.cc | 14 +++++++------- src/IconbarTool.cc | 1 - src/IconbarTool.hh | 2 -- src/Keys.cc | 1 - src/Keys.hh | 10 +++++----- src/Layer.hh | 2 +- src/LayerMenu.cc | 12 ++++++------ src/Remember.cc | 8 ++------ src/Remember.hh | 1 - src/RootCmdMenuItem.hh | 1 - src/RootTheme.cc | 18 +++++++++--------- src/RootTheme.hh | 4 ---- src/Screen.cc | 5 ++--- src/Screen.hh | 2 -- src/ScreenPlacement.cc | 1 - src/ScreenResources.cc | 1 - src/Slit.cc | 13 ++++++------- src/Slit.hh | 2 -- src/SlitClient.cc | 2 +- src/SlitClient.hh | 1 - src/SystemTray.hh | 2 -- src/ToolTheme.hh | 2 -- src/WinButton.cc | 40 +++++++++++++++++++--------------------- src/WinClient.hh | 4 +--- src/Window.cc | 6 +++--- src/Window.hh | 2 -- src/WorkspaceCmd.hh | 7 ++----- src/Xinerama.hh | 8 ++++---- src/Xutil.cc | 7 ------- src/Xutil.hh | 2 -- src/fluxbox.hh | 11 +++++------ 77 files changed, 161 insertions(+), 251 deletions(-) diff --git a/src/ArrowButton.hh b/src/ArrowButton.hh index 2ae4b87..176a9d4 100644 --- a/src/ArrowButton.hh +++ b/src/ArrowButton.hh @@ -24,7 +24,7 @@ #ifndef ARROWBUTTON_HH #define ARROWBUTTON_HH -#include "Button.hh" +#include "FbTk/Button.hh" /// Displays a arrow on a button class ArrowButton: public FbTk::Button { diff --git a/src/AtomHandler.hh b/src/AtomHandler.hh index cec75d3..efa72fe 100644 --- a/src/AtomHandler.hh +++ b/src/AtomHandler.hh @@ -40,7 +40,7 @@ public: virtual void setupFrame(FluxboxWindow &win) = 0; virtual void setupClient(WinClient &winclient) = 0; - virtual void updateFocusedWindow(BScreen &screen, Window win) = 0; + virtual void updateFocusedWindow(BScreen &screen, Window win) = 0; virtual void updateClientList(BScreen &screen) = 0; virtual void updateWorkspaceNames(BScreen &screen) = 0; virtual void updateCurrentWorkspace(BScreen &screen) = 0; @@ -54,7 +54,7 @@ public: virtual void updateHints(FluxboxWindow &win) = 0; virtual void updateLayer(FluxboxWindow &win) = 0; virtual void updateFrameExtents(FluxboxWindow &win) { } - virtual bool checkClientMessage(const XClientMessageEvent &ce, + virtual bool checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient) = 0; virtual bool propertyNotify(WinClient &winclient, Atom the_property) = 0; @@ -67,7 +67,7 @@ protected: AtomHandler():m_update(true) { } void disableUpdate() { m_update = false; } - void enableUpdate() { m_update = true; } + void enableUpdate() { m_update = true; } private: bool m_update; ///< do we get update or not }; diff --git a/src/ButtonTool.cc b/src/ButtonTool.cc index d865681..96797b1 100644 --- a/src/ButtonTool.cc +++ b/src/ButtonTool.cc @@ -22,10 +22,9 @@ // $Id$ #include "ButtonTool.hh" - +#include "ButtonTheme.hh" #include "FbTk/Button.hh" #include "FbTk/ImageControl.hh" -#include "ButtonTheme.hh" ButtonTool::ButtonTool(FbTk::Button *button, ToolbarItem::Type type, diff --git a/src/ClientPattern.hh b/src/ClientPattern.hh index dd24add..0ae2880 100644 --- a/src/ClientPattern.hh +++ b/src/ClientPattern.hh @@ -27,9 +27,8 @@ #define CLIENTPATTERN_HH #include "FbTk/RegExp.hh" -#include "NotCopyable.hh" +#include "FbTk/NotCopyable.hh" -#include <string> #include <list> class Focusable; diff --git a/src/ClockTool.cc b/src/ClockTool.cc index 0f4695b..5abfffa 100644 --- a/src/ClockTool.cc +++ b/src/ClockTool.cc @@ -46,13 +46,12 @@ #include <time.h> #endif #include <sys/time.h> -#include <string> #include <typeinfo> class ClockMenuItem: public FbTk::MenuItem { public: explicit ClockMenuItem(ClockTool &tool): - FbTk::MenuItem(""), m_tool(tool) { + FbTk::MenuItem(""), m_tool(tool) { // determine 12/24 hour format _FB_USES_NLS; if (m_tool.timeFormat().find("%k") != std::string::npos || @@ -78,7 +77,7 @@ public: newstr = "%I"; else if ((pos = newformat.find("%T")) != std::string::npos) newstr = "%r"; - + // 12 hour if (newstr.empty()) { clock24hour = false; @@ -88,9 +87,9 @@ public: newstr = "%H"; else if ((pos = newformat.find("%r")) != std::string::npos) newstr = "%T"; - + } - + if (!newstr.empty()) { newformat.replace(pos, 2, newstr); @@ -102,7 +101,7 @@ public: newformat.erase(pos, 2); } - + m_tool.setTimeFormat(newformat); if (m_tool.timeFormat().find("%k") != std::string::npos || @@ -111,7 +110,7 @@ public: setLabel( _FB_XTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") ); else setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") ); - + } // else some other strange format...so we don't do anything FbTk::MenuItem::click(button, time, mods); } @@ -127,7 +126,7 @@ public: return; std::string resourcename = screen->name() + ".strftimeFormat"; - CommandDialog *dialog = new CommandDialog(*screen, "Edit Clock Format", + CommandDialog *dialog = new CommandDialog(*screen, "Edit Clock Format", "SetResourceValue " + resourcename + " "); FbTk::RefCount<FbTk::Command> cmd(FbTk::ObjectRegistry<FbTk::Command>::instance().parse("reconfigure")); dialog->setPostCommand(cmd); @@ -143,7 +142,7 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent, m_theme(theme), m_screen(screen), m_pixmap(0), - m_timeformat(screen.resourceManager(), std::string("%k:%M"), + m_timeformat(screen.resourceManager(), std::string("%k:%M"), screen.name() + ".strftimeFormat", screen.altName() + ".StrftimeFormat"), m_stringconvertor(FbTk::StringConvertor::ToFbString) { // attach signals @@ -162,7 +161,7 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent, // if nothing has changed, it wont update the graphics m_timer.setInterval(1); // m_timer.setTimeout(delay); // don't need to set timeout on interval timer - FbTk::RefCount<FbTk::Command> update_graphic(new FbTk::SimpleCommand<ClockTool>(*this, + FbTk::RefCount<FbTk::Command> update_graphic(new FbTk::SimpleCommand<ClockTool>(*this, &ClockTool::updateTime)); m_timer.setCommand(update_graphic); m_timer.start(); @@ -248,7 +247,7 @@ void ClockTool::update(FbTk::Subject *subj) { } -unsigned int ClockTool::borderWidth() const { +unsigned int ClockTool::borderWidth() const { return m_button.borderWidth(); } @@ -297,12 +296,12 @@ void ClockTool::updateTime() { // Just change things that affect the size void ClockTool::updateSizing() { m_button.setBorderWidth(m_theme.border().width()); - // resizes if new timeformat + // resizes if new timeformat update(0); } void ClockTool::reRender() { - if (m_pixmap) + if (m_pixmap) m_screen.imageControl().removeImage(m_pixmap); if (m_theme.texture().usePixmap()) { diff --git a/src/ClockTool.hh b/src/ClockTool.hh index e0830f3..ee3011b 100644 --- a/src/ClockTool.hh +++ b/src/ClockTool.hh @@ -34,8 +34,6 @@ #include "FbTk/Timer.hh" #include "FbTk/FbString.hh" -#include <string> - class ToolTheme; class BScreen; @@ -76,7 +74,7 @@ private: void updateSizing(); FbTk::TextButton m_button; - + const ToolTheme &m_theme; BScreen &m_screen; Pixmap m_pixmap; diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index cd54deb..ceb0ef5 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc @@ -35,9 +35,6 @@ #include "FbTk/stringstream.hh" #include "FbTk/StringUtil.hh" -#include <string> -#include <vector> - using FbTk::Command; namespace { diff --git a/src/CurrentWindowCmd.hh b/src/CurrentWindowCmd.hh index fdce8d6..b6143a1 100644 --- a/src/CurrentWindowCmd.hh +++ b/src/CurrentWindowCmd.hh @@ -25,7 +25,7 @@ #ifndef CURRENTWINDOWCMD_HH #define CURRENTWINDOWCMD_HH -#include "Command.hh" +#include "FbTk/Command.hh" #include "Window.hh" #include "ClientPattern.hh" diff --git a/src/FbAtoms.cc b/src/FbAtoms.cc index ccbf41c..43ce357 100644 --- a/src/FbAtoms.cc +++ b/src/FbAtoms.cc @@ -22,7 +22,7 @@ // $Id$ #include "FbAtoms.hh" -#include "App.hh" +#include "FbTk/App.hh" #include <string> diff --git a/src/FbCommands.hh b/src/FbCommands.hh index 566b17a..51f21d3 100644 --- a/src/FbCommands.hh +++ b/src/FbCommands.hh @@ -26,16 +26,13 @@ #ifndef FBCOMMANDS_HH #define FBCOMMANDS_HH -#include "Command.hh" - +#include "FbTk/Command.hh" #include "FbTk/RefCount.hh" + #include "ClientMenu.hh" #include "ClientPattern.hh" #include "FocusableList.hh" -#include <list> -#include <string> - namespace FbCommands { /// executes a system command diff --git a/src/FbMenu.hh b/src/FbMenu.hh index 63ab772..05ee307 100644 --- a/src/FbMenu.hh +++ b/src/FbMenu.hh @@ -24,8 +24,8 @@ #ifndef FBMENU_HH #define FBMENU_HH -#include "Menu.hh" -#include "XLayerItem.hh" +#include "FbTk/Menu.hh" +#include "FbTk/XLayerItem.hh" namespace FbTk { class MenuTheme; diff --git a/src/FbRootWindow.cc b/src/FbRootWindow.cc index 44df7ba..8aeff99 100644 --- a/src/FbRootWindow.cc +++ b/src/FbRootWindow.cc @@ -22,8 +22,8 @@ // $Id$ #include "FbRootWindow.hh" -#include "App.hh" +#include "FbTk/App.hh" #include <X11/Xutil.h> FbRootWindow::FbRootWindow(int screen_num): diff --git a/src/FbTk/App.cc b/src/FbTk/App.cc index d60f95b..4bdc205 100644 --- a/src/FbTk/App.cc +++ b/src/FbTk/App.cc @@ -26,8 +26,6 @@ #include "EventManager.hh" -#include <string> - namespace FbTk { App *App::s_app = 0; diff --git a/src/FbTk/Button.hh b/src/FbTk/Button.hh index 4b2ef8b..afad9e1 100644 --- a/src/FbTk/Button.hh +++ b/src/FbTk/Button.hh @@ -32,19 +32,17 @@ #include "Color.hh" #include "Text.hh" -#include <X11/Xlib.h> - namespace FbTk { class Theme; -class Button:public FbTk::FbWindow, public EventHandler, +class Button:public FbTk::FbWindow, public EventHandler, private NotCopyable { public: Button(int screen_num, int x, int y, unsigned int width, unsigned int height); Button(const FbWindow &parent, int x, int y, unsigned int width, unsigned int height); virtual ~Button(); - + /// sets action when the button is clicked with #button mouse btn void setOnClick(RefCount<Command> &com, int button = 1); diff --git a/src/FbTk/EventManager.hh b/src/FbTk/EventManager.hh index e39ad7d..1f6eb8a 100644 --- a/src/FbTk/EventManager.hh +++ b/src/FbTk/EventManager.hh @@ -35,7 +35,7 @@ class EventHandler; class EventManager { public: static EventManager *instance(); - + void handleEvent(XEvent &ev); // adds a parent to listen to the childrens events void addParent(EventHandler &ev, const FbWindow &parent); diff --git a/src/FbTk/FbDrawable.cc b/src/FbTk/FbDrawable.cc index dd6e4a9..d5436c6 100644 --- a/src/FbTk/FbDrawable.cc +++ b/src/FbTk/FbDrawable.cc @@ -42,7 +42,7 @@ void FbDrawable::copyArea(Drawable src, GC gc, unsigned int width, unsigned int height) { if (drawable() == 0 || src == 0 || gc == 0) return; - XCopyArea(s_display, + XCopyArea(display(), src, drawable(), gc, src_x, src_y, width, height, @@ -53,27 +53,27 @@ void FbDrawable::fillRectangle(GC gc, int x, int y, unsigned int width, unsigned int height) { if (drawable() == 0 || gc == 0) return; - XFillRectangle(s_display, + XFillRectangle(display(), drawable(), gc, x, y, width, height); } -void FbDrawable::drawRectangle(GC gc, int x, int y, +void FbDrawable::drawRectangle(GC gc, int x, int y, unsigned int width, unsigned int height) { if (drawable() == 0 || gc == 0) return; - XDrawRectangle(s_display, + XDrawRectangle(display(), drawable(), gc, x, y, width, height); } -void FbDrawable::drawLine(GC gc, int start_x, int start_y, +void FbDrawable::drawLine(GC gc, int start_x, int start_y, int end_x, int end_y) { if (drawable() == 0 || gc == 0) return; - XDrawLine(s_display, + XDrawLine(display(), drawable(), gc, start_x, start_y, @@ -84,7 +84,7 @@ void FbDrawable::fillPolygon(GC gc, XPoint *points, int npoints, int shape, int mode) { if (drawable() == 0 || gc == 0 || points == 0 || npoints == 0) return; - XFillPolygon(s_display, + XFillPolygon(display(), drawable(), gc, points, npoints, shape, mode); } @@ -92,7 +92,7 @@ void FbDrawable::fillPolygon(GC gc, XPoint *points, int npoints, // x, y, width and height define a space within which we're drawing a triangle (centred) // scale defines number of triangles that'd fit in a space of 100 width x 100 height // (i.e. 200 = half size, 300 = a third). Its a bit backwards but it allows more flexibility -void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type, +void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type, int x, int y, unsigned int width, unsigned int height, int scale) { if (drawable() == 0 || gc == 0 || width == 0 || height == 0) @@ -141,7 +141,7 @@ void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type, pts[1].x = -ax/2+1; pts[1].y = -ay; pts[2].x = ax-1; pts[2].y = 0; break; - + } // re-centre on the specified points @@ -149,21 +149,21 @@ void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type, pts[0].y += y; fillPolygon(gc, - pts, 3, + pts, 3, Convex, CoordModePrevious); } #ifdef NOT_USED void FbDrawable::drawPoint(GC gc, int x, int y) { if (drawable() == 0 || gc == 0) - return; - XDrawPoint(s_display, drawable(), gc, x, y); + return; + XDrawPoint(display(), drawable(), gc, x, y); } #endif XImage *FbDrawable::image(int x, int y, unsigned int width, unsigned int height) const { - return XGetImage(s_display, drawable(), - x, y, width, height, + return XGetImage(display(), drawable(), + x, y, width, height, AllPlanes, // plane mask ZPixmap); } diff --git a/src/FbTk/FbDrawable.hh b/src/FbTk/FbDrawable.hh index 828295d..0806654 100644 --- a/src/FbTk/FbDrawable.hh +++ b/src/FbTk/FbDrawable.hh @@ -75,7 +75,7 @@ public: virtual unsigned int depth() const = 0; static Display *display() { return s_display; } protected: - static Display *s_display; // display connection // display connection + static Display *s_display; // display connection }; } // end namespace FbTk diff --git a/src/FbTk/FbPixmap.hh b/src/FbTk/FbPixmap.hh index cf0448d..8d85bdf 100644 --- a/src/FbTk/FbPixmap.hh +++ b/src/FbTk/FbPixmap.hh @@ -27,8 +27,6 @@ #include "FbDrawable.hh" #include "Text.hh" -#include <X11/Xlib.h> - namespace FbTk { /// a wrapper for X Pixmap diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc index 7ee1b5f..e804542 100644 --- a/src/FbTk/FbString.cc +++ b/src/FbTk/FbString.cc @@ -20,7 +20,9 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//�$Id$ +// $Id$ + +#include "FbString.hh" #ifdef HAVE_CERRNO #include <cerrno> @@ -38,14 +40,8 @@ #include <stdlib.h> #endif -#include "FbString.hh" -#include "config.h" - #include <stdio.h> -#ifdef HAVE_ICONV -#include <iconv.h> -#endif // HAVE_ICONV #include <langinfo.h> #include <locale.h> diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index 863c2df..f266ec3 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh @@ -108,7 +108,7 @@ public: virtual void move(int x, int y) { if (x == m_x && y == m_y) return; - XMoveWindow(s_display, m_window, x, y); + XMoveWindow(display(), m_window, x, y); m_x = x; m_y = y; updateBackground(true); @@ -117,7 +117,7 @@ public: virtual void resize(unsigned int width, unsigned int height) { if (width == m_width && height == m_height) return; - XResizeWindow(s_display, m_window, width, height); + XResizeWindow(display(), m_window, width, height); m_width = width; m_height = height; updateBackground(false); @@ -126,7 +126,7 @@ public: virtual void moveResize(int x, int y, unsigned int width, unsigned int height) { if (x == m_x && y == m_y && width == m_width && height == m_height) return; - XMoveResizeWindow(s_display, m_window, x, y, width, height); + XMoveResizeWindow(display(), m_window, x, y, width, height); m_x = x; m_y = y; m_width = width; @@ -183,7 +183,6 @@ public: unsigned char alpha() const; int screenNumber() const; long eventMask() const; - Display *display() const { return s_display; } /// compare X window bool operator == (Window win) const { return m_window == win; } diff --git a/src/FbTk/FileUtil.hh b/src/FbTk/FileUtil.hh index 664c26d..4721c2f 100644 --- a/src/FbTk/FileUtil.hh +++ b/src/FbTk/FileUtil.hh @@ -61,7 +61,7 @@ namespace FileUtil { bool copyFile(const char* from, const char* to); }; // end of File namespace - + /// Wrapper class for DIR * routines class Directory : private FbTk::NotCopyable { public: @@ -70,19 +70,19 @@ public: const std::string &name() const { return m_name; } /// go to start of filelist void rewind(); - /// gets next dirent info struct in directory and + /// gets next dirent info struct in directory and /// jumps to next directory entry struct dirent * read(); /// reads next filename in directory std::string readFilename(); /// close directory - void close(); + void close(); /// open directory /// @param dir the directory name bool open(const char *dir); /// @return number of entries in the directory size_t entries() const { return m_num_entries; } - + private: std::string m_name; DIR *m_dir; diff --git a/src/FbTk/Font.hh b/src/FbTk/Font.hh index 13bf12b..df35b55 100644 --- a/src/FbTk/Font.hh +++ b/src/FbTk/Font.hh @@ -63,15 +63,15 @@ public: loaded font */ bool load(const std::string &name); - + void setHalo(bool flag) { m_halo = flag; if (m_halo) setShadow(false); } void setHaloColor(const Color& color) { m_halo_color = color; } - + void setShadow(bool flag) { m_shadow = flag; if (m_shadow) setHalo(false); } void setShadowColor(const Color& color) { m_shadow_color = color; } void setShadowOffX(int offx) { m_shadow_offx = offx; } void setShadowOffY(int offy) { m_shadow_offy = offy; } - + /** @param text text to check size @param size length of text in bytes @@ -110,7 +110,7 @@ private: FbTk::FontImp* m_fontimp; ///< font implementation std::string m_fontstr; ///< font name - + static bool s_multibyte; ///< if the fontimp should be a multibyte font static bool s_utf8mode; ///< should the font use utf8 font imp diff --git a/src/FbTk/GContext.cc b/src/FbTk/GContext.cc index ebdc178..79db31b 100644 --- a/src/FbTk/GContext.cc +++ b/src/FbTk/GContext.cc @@ -33,9 +33,9 @@ namespace FbTk { Display *GContext::m_display = 0; -GContext::GContext(const FbTk::FbDrawable &drawable): +GContext::GContext(const FbTk::FbDrawable &drawable): m_gc(XCreateGC(drawable.display(), drawable.drawable(), 0, 0)) { - + if (m_display == 0) m_display = drawable.display(); @@ -78,7 +78,7 @@ void GContext::copy(GC gc) { void GContext::copy(const GContext &gc) { // copy X gc copy(gc.gc()); - + //!! TODO: copy our extended gcontext } diff --git a/src/FbTk/GContext.hh b/src/FbTk/GContext.hh index 03c4235..33d0759 100644 --- a/src/FbTk/GContext.hh +++ b/src/FbTk/GContext.hh @@ -27,8 +27,6 @@ #include "Color.hh" #include "FbPixmap.hh" -#include <X11/Xlib.h> - namespace FbTk { class FbDrawable; diff --git a/src/FbTk/Image.hh b/src/FbTk/Image.hh index b0f3ecc..1f8c41d 100644 --- a/src/FbTk/Image.hh +++ b/src/FbTk/Image.hh @@ -33,16 +33,16 @@ namespace FbTk { class ImageBase; class PixmapWithMask; -/// loads images +/// loads images class Image { public: - + /// called at FbTk::App creation time, init some internal stuff static void init(); /// called at FbTk:App destruction time, frees stuff allocated by init() static void shutdown(); - + /// @return an instance of PixmapWithMask on success, 0 on failure static PixmapWithMask *load(const std::string &filename, int screen_num); /// for register file type and imagebase @@ -67,7 +67,7 @@ private: /// common interface for all image classes class ImageBase { -public: +public: virtual ~ImageBase() { Image::remove(*this); } virtual PixmapWithMask *load(const std::string &name, int screen_num) const = 0; }; diff --git a/src/FbTk/ImageControl.hh b/src/FbTk/ImageControl.hh index 08a797f..7668574 100644 --- a/src/FbTk/ImageControl.hh +++ b/src/FbTk/ImageControl.hh @@ -33,7 +33,6 @@ #include "Timer.hh" #include "NotCopyable.hh" -#include <X11/Xlib.h> #include <list> namespace FbTk { diff --git a/src/FbTk/IntMenuItem.hh b/src/FbTk/IntMenuItem.hh index 69d5409..010a614 100644 --- a/src/FbTk/IntMenuItem.hh +++ b/src/FbTk/IntMenuItem.hh @@ -24,8 +24,6 @@ #include "MenuItem.hh" -#include <string> - namespace FbTk { class Accessor<class T>; diff --git a/src/FbTk/MacroCommand.cc b/src/FbTk/MacroCommand.cc index 3a05179..0241154 100644 --- a/src/FbTk/MacroCommand.cc +++ b/src/FbTk/MacroCommand.cc @@ -27,7 +27,6 @@ #include "StringUtil.hh" #include <list> -#include <string> namespace FbTk { diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh index 45adb71..595474e 100644 --- a/src/FbTk/Menu.hh +++ b/src/FbTk/Menu.hh @@ -24,20 +24,18 @@ // $Id$ -#ifndef FBTK_MENU_HH -#define FBTK_MENU_HH +#ifndef FBTK_MENU_HH +#define FBTK_MENU_HH -#include <X11/Xlib.h> #include <vector> -#include <string> #include <memory> +#include "FbString.hh" #include "FbWindow.hh" #include "EventHandler.hh" #include "Observer.hh" #include "MenuTheme.hh" #include "Timer.hh" -#include "FbString.hh" #include "TypeAhead.hh" namespace FbTk { diff --git a/src/FbTk/MenuSeparator.cc b/src/FbTk/MenuSeparator.cc index be43a87..8964748 100644 --- a/src/FbTk/MenuSeparator.cc +++ b/src/FbTk/MenuSeparator.cc @@ -1,7 +1,7 @@ // MenuSeparator.cc for FbTk - Fluxbox ToolKit // Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) // and Simon Bowden (rathnor at users.sourceforge.net) -// +// // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation @@ -30,7 +30,7 @@ namespace FbTk { -void MenuSeparator::draw(FbDrawable &drawable, +void MenuSeparator::draw(FbDrawable &drawable, const MenuTheme &theme, bool highlight, bool draw_foreground, bool draw_background, int x, int y, diff --git a/src/FbTk/MenuSeparator.hh b/src/FbTk/MenuSeparator.hh index 3334f5e..7ea7642 100644 --- a/src/FbTk/MenuSeparator.hh +++ b/src/FbTk/MenuSeparator.hh @@ -1,7 +1,7 @@ // MenuSeparator.hh for FbTk - Fluxbox ToolKit // Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) // and Simon Bowden (rathnor at users.sourceforge.net) -// +// // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation @@ -31,7 +31,7 @@ namespace FbTk { class MenuSeparator: public MenuItem { public: - virtual void draw(FbDrawable &drawable, + virtual void draw(FbDrawable &drawable, const MenuTheme &theme, bool highlight, bool draw_foreground, bool draw_background, int x, int y, diff --git a/src/FbTk/ObjectRegistry.hh b/src/FbTk/ObjectRegistry.hh index bc1964c..a3becd9 100644 --- a/src/FbTk/ObjectRegistry.hh +++ b/src/FbTk/ObjectRegistry.hh @@ -26,7 +26,6 @@ #include "StringUtil.hh" -#include <string> #include <map> using std::string; diff --git a/src/FbTk/RegExp.cc b/src/FbTk/RegExp.cc index df98982..3ee95b6 100644 --- a/src/FbTk/RegExp.cc +++ b/src/FbTk/RegExp.cc @@ -27,7 +27,6 @@ #define _GNU_SOURCE #endif // _GNU_SOURCE -#include <string> #include <iostream> using std::string; diff --git a/src/FbTk/Shape.hh b/src/FbTk/Shape.hh index 9d71e70..04382cf 100644 --- a/src/FbTk/Shape.hh +++ b/src/FbTk/Shape.hh @@ -24,7 +24,6 @@ #include "FbPixmap.hh" -#include <X11/Xlib.h> #include <vector> namespace FbTk { diff --git a/src/FbTk/Theme.hh b/src/FbTk/Theme.hh index a935686..96f1b28 100644 --- a/src/FbTk/Theme.hh +++ b/src/FbTk/Theme.hh @@ -28,13 +28,13 @@ #ifndef FBTK_THEME_HH #define FBTK_THEME_HH +#include "XrmDatabaseHelper.hh" +#include "Subject.hh" + #include <string> #include <list> #include <vector> -#include "XrmDatabaseHelper.hh" -#include "Subject.hh" - namespace FbTk { class Theme; diff --git a/src/FbTk/TypeAhead.hh b/src/FbTk/TypeAhead.hh index 838a454..cac90a5 100644 --- a/src/FbTk/TypeAhead.hh +++ b/src/FbTk/TypeAhead.hh @@ -23,7 +23,6 @@ #define FBTK_TYPEAHEAD_HH #include "ITypeAheadable.hh" -#include <vector> #include "SearchResult.hh" namespace FbTk { diff --git a/src/FbTk/XFontImp.hh b/src/FbTk/XFontImp.hh index d491a07..b419ee8 100644 --- a/src/FbTk/XFontImp.hh +++ b/src/FbTk/XFontImp.hh @@ -26,8 +26,6 @@ #include "FontImp.hh" -#include <X11/Xlib.h> - namespace FbTk { /// regular X font implementation for FbTk diff --git a/src/FbTk/XLayer.hh b/src/FbTk/XLayer.hh index 25faa84..e311842 100644 --- a/src/FbTk/XLayer.hh +++ b/src/FbTk/XLayer.hh @@ -26,8 +26,8 @@ #ifndef FBTK_XLAYER_HH #define FBTK_XLAYER_HH -#include <list> #include "Layer.hh" +#include <list> namespace FbTk { diff --git a/src/FbTk/XftFontImp.hh b/src/FbTk/XftFontImp.hh index 178ef3a..d80c5c9 100644 --- a/src/FbTk/XftFontImp.hh +++ b/src/FbTk/XftFontImp.hh @@ -24,9 +24,9 @@ #ifndef FBTK_XFTFONTIMP_HH #define FBTK_XFTFONTIMP_HH -#include <X11/Xft/Xft.h> #include "FontImp.hh" -#include <string> + +#include <X11/Xft/Xft.h> namespace FbTk { diff --git a/src/FbTk/XmbFontImp.cc b/src/FbTk/XmbFontImp.cc index 3a45b09..14d3b2b 100644 --- a/src/FbTk/XmbFontImp.cc +++ b/src/FbTk/XmbFontImp.cc @@ -56,8 +56,6 @@ #include <string.h> #endif -#include <X11/Xlib.h> - using std::string; namespace { diff --git a/src/FbTk/XmbFontImp.hh b/src/FbTk/XmbFontImp.hh index 992fa90..18aa5ec 100644 --- a/src/FbTk/XmbFontImp.hh +++ b/src/FbTk/XmbFontImp.hh @@ -26,8 +26,6 @@ #include "FontImp.hh" -#include <X11/Xlib.h> - namespace FbTk { /// multibyte font implementation for FbTk diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index ce1670e..5b95ec4 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -68,9 +68,9 @@ FbWinFrame::FbWinFrame(BScreen &screen, FbWinFrameTheme &theme, FbTk::ImageContr ButtonMotionMask | ExposureMask | EnterWindowMask | LeaveWindowMask), m_grip_left(m_handle, 0, 0, 10, 4, - ButtonPressMask | ButtonReleaseMask | - ButtonMotionMask | ExposureMask | - EnterWindowMask | LeaveWindowMask), + ButtonPressMask | ButtonReleaseMask | + ButtonMotionMask | ExposureMask | + EnterWindowMask | LeaveWindowMask), m_clientarea(m_window, 0, 0, 100, 100, ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | ExposureMask | diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index f1dc9ed..2d427ee 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh @@ -36,8 +36,6 @@ #include "FbTk/Shape.hh" #include <vector> -#include <list> -#include <string> #include <memory> class FbWinFrameTheme; diff --git a/src/Gnome.cc b/src/Gnome.cc index e570526..b6f10e1 100644 --- a/src/Gnome.cc +++ b/src/Gnome.cc @@ -23,16 +23,15 @@ #include "Gnome.hh" -#include "App.hh" +#include "FbTk/App.hh" +#include "FbTk/I18n.hh" #include "Window.hh" #include "Screen.hh" #include "WinClient.hh" #include "Workspace.hh" #include "Layer.hh" -#include "FbTk/I18n.hh" #include <iostream> -#include <new> #ifdef HAVE_CSTRING #include <cstring> #else diff --git a/src/Gnome.hh b/src/Gnome.hh index 2b07fab..f437ddb 100644 --- a/src/Gnome.hh +++ b/src/Gnome.hh @@ -62,7 +62,7 @@ public: WIN_HINTS_GROUP_TRANSIENT = (1<<3), // Reserved - definition is unclear WIN_HINTS_FOCUS_ON_CLICK = (1<<4) // app only accepts focus if clicked }; - + Gnome(); ~Gnome(); void initForScreen(BScreen &screen); @@ -83,7 +83,7 @@ public: void updateWorkspace(FluxboxWindow &win); bool checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient); - + // ignore these ones void updateFrameClose(FluxboxWindow &win) {} bool propertyNotify(WinClient &winclient, Atom the_property); @@ -99,7 +99,7 @@ private: m_gnome_wm_win_workspace_count, m_gnome_wm_win_workspace_names, m_gnome_wm_win_client_list; Atom m_gnome_wm_prot; - Atom m_gnome_wm_supporting_wm_check; + Atom m_gnome_wm_supporting_wm_check; std::vector<Window> m_gnomewindows; }; diff --git a/src/HeadArea.hh b/src/HeadArea.hh index 116acf2..b0c33a6 100644 --- a/src/HeadArea.hh +++ b/src/HeadArea.hh @@ -22,11 +22,10 @@ #ifndef HEADAREA_HH #define HEADAREA_HH +#include "FbTk/NotCopyable.hh" #include <memory> #include <list> -#include "FbTk/NotCopyable.hh" - class Strut; class HeadArea: private FbTk::NotCopyable { @@ -37,7 +36,7 @@ public: void clearStrut(Strut *str); bool updateAvailableWorkspaceArea(); const Strut *availableWorkspaceArea() const { - return m_available_workspace_area.get(); + return m_available_workspace_area.get(); } private: diff --git a/src/IconButton.cc b/src/IconButton.cc index b00c335..5db7773 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc @@ -51,8 +51,8 @@ IconButton::IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme, Focusable &win): FbTk::TextButton(parent, theme.focusedText().font(), win.title()), - m_win(win), - m_icon_window(*this, 1, 1, 1, 1, + m_win(win), + m_icon_window(*this, 1, 1, 1, 1, ExposureMask | ButtonPressMask | ButtonReleaseMask), m_use_pixmap(true), m_theme(theme), @@ -62,7 +62,7 @@ IconButton::IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme, m_win.titleSig().attach(this); m_win.focusSig().attach(this); m_win.attentionSig().attach(this); - + FbTk::EventManager::instance()->add(*this, m_icon_window); reconfigTheme(); @@ -174,8 +174,8 @@ void IconButton::update(FbTk::Subject *subj) { return; } - // we got signal that either title or - // icon pixmap was updated, + // we got signal that either title or + // icon pixmap was updated, // so we refresh everything Display *display = FbTk::App::instance()->display(); @@ -197,7 +197,7 @@ void IconButton::update(FbTk::Subject *subj) { FbTk::translateCoords(orientation(), iconx, icony, w, h); FbTk::translatePosition(orientation(), iconx, icony, neww, newh, 0); - + m_icon_window.moveResize(iconx, icony, neww, newh); m_icon_pixmap.copy(m_win.icon().pixmap().drawable(), @@ -254,7 +254,7 @@ void IconButton::drawText(int x, int y, FbTk::FbDrawable *drawable) { else FbTk::TextButton::drawText(1, y, drawable); } - + bool IconButton::setOrientation(FbTk::Orientation orient) { if (orientation() == orient) return true; diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index 4275ec9..0f10c5c 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc @@ -50,7 +50,6 @@ #include "FbTk/MenuSeparator.hh" #include <typeinfo> -#include <string> #include <iterator> #ifdef HAVE_CSTRING #include <cstring> diff --git a/src/IconbarTool.hh b/src/IconbarTool.hh index 90bb790..173d564 100644 --- a/src/IconbarTool.hh +++ b/src/IconbarTool.hh @@ -33,8 +33,6 @@ #include "FbTk/Observer.hh" #include "FbTk/Resource.hh" -#include <X11/Xlib.h> - #include <map> class IconbarTheme; diff --git a/src/Keys.cc b/src/Keys.cc index 0be5384..66ee022 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -83,7 +83,6 @@ #include <sys/stat.h> #endif // HAVE_SYS_STAT_H -#include <X11/Xlib.h> #include <X11/Xproto.h> #include <X11/keysym.h> #include <X11/Xutil.h> diff --git a/src/Keys.hh b/src/Keys.hh index f5c8cea..226d52b 100644 --- a/src/Keys.hh +++ b/src/Keys.hh @@ -24,16 +24,16 @@ #ifndef KEYS_HH #define KEYS_HH -#include <string> -#include <list> -#include <map> -#include <X11/Xlib.h> - #include "FbTk/NotCopyable.hh" #include "FbTk/RefCount.hh" #include "FbTk/Command.hh" #include "FbTk/KeyUtil.hh" +#include <string> +#include <list> +#include <map> + + namespace FbTk { class EventHandler; } diff --git a/src/Layer.hh b/src/Layer.hh index aa99506..bbda950 100644 --- a/src/Layer.hh +++ b/src/Layer.hh @@ -23,7 +23,7 @@ #define LAYER_HH #include <string> -#include <stdio.h> +#include <cstdio> using std::string; diff --git a/src/LayerMenu.cc b/src/LayerMenu.cc index d8612e5..778cb7d 100644 --- a/src/LayerMenu.cc +++ b/src/LayerMenu.cc @@ -35,7 +35,7 @@ LayerMenu::LayerMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl, ToggleMenu(tm, imgctrl, layer) { _FB_USES_NLS; - + struct { int set; int base; @@ -50,17 +50,17 @@ LayerMenu::LayerMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl, {0, 0, _FB_XTEXT(Layer, Bottom, "Bottom", "Layer bottom"), Layer::BOTTOM}, {0, 0, _FB_XTEXT(Layer, Desktop, "Desktop", "Layer desktop"), Layer::DESKTOP}, }; - + FbTk::RefCount<FbTk::Command> saverc_cmd(new FbCommands::SaveResources()); for (size_t i=0; i < 6; ++i) { // TODO: fetch nls string - if (save_rc) { - insert(new LayerMenuItem(layer_menuitems[i].default_str, + if (save_rc) { + insert(new LayerMenuItem(layer_menuitems[i].default_str, object, layer_menuitems[i].layernum, saverc_cmd)); } else { - insert(new LayerMenuItem(layer_menuitems[i].default_str, - object, layer_menuitems[i].layernum)); + insert(new LayerMenuItem(layer_menuitems[i].default_str, + object, layer_menuitems[i].layernum)); } } updateMenu(); diff --git a/src/Remember.cc b/src/Remember.cc index ba7bf81..02866dd 100644 --- a/src/Remember.cc +++ b/src/Remember.cc @@ -43,7 +43,6 @@ #include "FbTk/Transparent.hh" -#include <X11/Xlib.h> #ifdef HAVE_CSTRING #include <cstring> #else @@ -51,14 +50,11 @@ #endif //use GNU extensions -#ifndef _GNU_SOURCE -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +#define _GNU_SOURCE #endif // _GNU_SOURCE #include <iostream> -#include <fstream> -#include <string> -#include <memory> #include <set> diff --git a/src/Remember.hh b/src/Remember.hh index 2d24839..4044afd 100644 --- a/src/Remember.hh +++ b/src/Remember.hh @@ -36,7 +36,6 @@ #include <fstream> #include <map> #include <list> -#include <string> #include <utility> #include <memory> diff --git a/src/RootCmdMenuItem.hh b/src/RootCmdMenuItem.hh index 4a541d9..69bbba5 100644 --- a/src/RootCmdMenuItem.hh +++ b/src/RootCmdMenuItem.hh @@ -25,7 +25,6 @@ #define ROOTCMDMENUITEM_HH #include "FbTk/MenuItem.hh" -#include <string> class RootCmdMenuItem: public FbTk::MenuItem { public: diff --git a/src/RootTheme.cc b/src/RootTheme.cc index 892e219..de28e14 100644 --- a/src/RootTheme.cc +++ b/src/RootTheme.cc @@ -1,6 +1,6 @@ // RootTheme.cc // Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) -// +// // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation @@ -57,7 +57,7 @@ public: BackgroundItem(FbTk::Theme &tm, const std::string &name, const std::string &altname): FbTk::ThemeItem<FbTk::Texture>(tm, name, altname), m_changed(false), m_loaded(false) { - + } void load(const std::string *o_name = 0, const std::string *o_altname = 0) { @@ -190,7 +190,7 @@ void RootTheme::reconfigTheme() { return; // - // Else parse background from style + // Else parse background from style // m_background->setApplied(); @@ -200,7 +200,7 @@ void RootTheme::reconfigTheme() { FbTk::StringUtil::removeTrailingWhitespace(filename); FbTk::StringUtil::removeFirstWhitespace(filename); // if background argument is a file then - // parse image options and call image setting + // parse image options and call image setting // command specified in the resources filename = FbTk::StringUtil::expandFilename(filename); if (FbTk::FileUtil::isRegularFile(filename.c_str())) { @@ -212,7 +212,7 @@ void RootTheme::reconfigTheme() { options = "-C "; if (strstr(m_background->options().c_str(), "aspect") != 0) options = "-A "; - + // compose wallpaper application "fbsetbg" with argumetns std::string commandargs = realProgramName("fbsetbg") + " " + options + filename; @@ -231,12 +231,12 @@ void RootTheme::reconfigTheme() { // render normal texture with fbsetroot - // Make sure the color strings are valid, + // Make sure the color strings are valid, // so we dont pass any `commands` that can be executed - bool color_valid = - FbTk::Color::validColorString(m_background->colorString().c_str(), + bool color_valid = + FbTk::Color::validColorString(m_background->colorString().c_str(), screenNum()); - bool color_to_valid = + bool color_to_valid = FbTk::Color::validColorString(m_background->colorToString().c_str(), screenNum()); diff --git a/src/RootTheme.hh b/src/RootTheme.hh index ff2fdcd..aae27b5 100644 --- a/src/RootTheme.hh +++ b/src/RootTheme.hh @@ -27,10 +27,6 @@ #include "FbTk/Theme.hh" #include "FbTk/GContext.hh" -#include <X11/Xlib.h> - -#include <string> - class BackgroundItem; class BScreen; diff --git a/src/Screen.cc b/src/Screen.cc index 2d214eb..8aa7693 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -39,7 +39,6 @@ // themes #include "FbWinFrameTheme.hh" -#include "FbTk/MenuTheme.hh" #include "RootTheme.hh" #include "WinButtonTheme.hh" #include "SlitTheme.hh" @@ -80,8 +79,8 @@ #include "FbTk/STLUtil.hh" //use GNU extensions -#ifndef _GNU_SOURCE -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +#define _GNU_SOURCE #endif // _GNU_SOURCE #ifdef HAVE_CONFIG_H diff --git a/src/Screen.hh b/src/Screen.hh index 8f5129a..e0e9b5f 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -38,7 +38,6 @@ #include "FbTk/NotCopyable.hh" #include "FbTk/Observer.hh" -#include <X11/Xlib.h> #include <X11/Xresource.h> #ifdef HAVE_CSTDIO @@ -46,7 +45,6 @@ #else #include <stdio.h> #endif -#include <string> #include <list> #include <vector> #include <fstream> diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc index 6d95860..efd9fa3 100644 --- a/src/ScreenPlacement.cc +++ b/src/ScreenPlacement.cc @@ -23,7 +23,6 @@ #include "ScreenPlacement.hh" - #include "RowSmartPlacement.hh" #include "MinOverlapPlacement.hh" #include "UnderMousePlacement.hh" diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc index c346c12..a19e029 100644 --- a/src/ScreenResources.cc +++ b/src/ScreenResources.cc @@ -26,7 +26,6 @@ // holds screen resource handling #include "Screen.hh" -#include <string> #ifdef HAVE_CSTRING #include <cstring> #else diff --git a/src/Slit.cc b/src/Slit.cc index 7dfd2f4..5a19eaf 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -36,19 +36,19 @@ #endif // HAVE_CONFIG_H #include "Screen.hh" -#include "ImageControl.hh" -#include "RefCount.hh" -#include "EventManager.hh" -#include "SimpleCommand.hh" +#include "FbTk/ImageControl.hh" +#include "FbTk/RefCount.hh" +#include "FbTk/EventManager.hh" +#include "FbTk/SimpleCommand.hh" +#include "FbTk/Theme.hh" +#include "FbTk/Transparent.hh" #include "MacroCommand.hh" #include "FbCommands.hh" #include "Layer.hh" #include "LayerMenu.hh" #include "XLayer.hh" #include "RootTheme.hh" -#include "FbTk/Theme.hh" #include "FbMenu.hh" -#include "Transparent.hh" #ifdef XINERAMA #include "Xinerama.hh" @@ -70,7 +70,6 @@ #endif // HAVE_SYS_STAT_H #include <X11/Xatom.h> -#include <X11/Xlib.h> #include <iostream> #include <algorithm> diff --git a/src/Slit.hh b/src/Slit.hh index bc7a948..8f68ec1 100644 --- a/src/Slit.hh +++ b/src/Slit.hh @@ -37,11 +37,9 @@ #include "FbTk/Resource.hh" #include "FbTk/XLayerItem.hh" -#include <X11/Xlib.h> #include <X11/Xutil.h> #include <list> -#include <string> #include <memory> class SlitTheme; diff --git a/src/SlitClient.cc b/src/SlitClient.cc index a90276a..afe03c8 100644 --- a/src/SlitClient.cc +++ b/src/SlitClient.cc @@ -24,7 +24,7 @@ #include "SlitClient.hh" #include "Screen.hh" -#include "App.hh" +#include "FbTk/App.hh" #include "Xutil.hh" #include <X11/Xutil.h> diff --git a/src/SlitClient.hh b/src/SlitClient.hh index 794c1a5..34b6251 100644 --- a/src/SlitClient.hh +++ b/src/SlitClient.hh @@ -27,7 +27,6 @@ #include "NotCopyable.hh" #include <X11/Xlib.h> - #include <string> class BScreen; diff --git a/src/SystemTray.hh b/src/SystemTray.hh index 9b3ef2f..99b6390 100644 --- a/src/SystemTray.hh +++ b/src/SystemTray.hh @@ -31,8 +31,6 @@ #include "ToolbarItem.hh" -#include <X11/Xlib.h> - #include <list> class BScreen; diff --git a/src/ToolTheme.hh b/src/ToolTheme.hh index 4224d62..4f13438 100644 --- a/src/ToolTheme.hh +++ b/src/ToolTheme.hh @@ -30,8 +30,6 @@ #include "FbTk/BorderTheme.hh" #include "FbTk/Texture.hh" -#include <string> - /// Handles toolbar item theme for text and texture class ToolTheme: public FbTk::Theme, public FbTk::TextTheme { public: diff --git a/src/WinButton.cc b/src/WinButton.cc index cdfb8b5..310cf51 100644 --- a/src/WinButton.cc +++ b/src/WinButton.cc @@ -21,14 +21,13 @@ /// $Id$ -#include <X11/Xlib.h> #include "WinButton.hh" -#include "App.hh" #include "Window.hh" #include "Screen.hh" #include "WinClient.hh" #include "WinButtonTheme.hh" +#include "FbTk/App.hh" #include "FbTk/Color.hh" #ifdef SHAPE @@ -36,7 +35,7 @@ #endif // SHAPE -WinButton::WinButton(const FluxboxWindow &listen_to, +WinButton::WinButton(const FluxboxWindow &listen_to, WinButtonTheme &theme, Type buttontype, const FbTk::FbWindow &parent, int x, int y, @@ -63,7 +62,7 @@ void WinButton::buttonReleaseEvent(XButtonEvent &event) { // when someone else tries to set the background, we may override it void WinButton::setBackgroundPixmap(Pixmap pm) { Pixmap my_pm = getBackgroundPixmap(); - + if (my_pm != 0) { overrode_bg = true; pm = my_pm; @@ -145,7 +144,7 @@ Pixmap WinButton::getBackgroundPixmap() const { else return m_theme.closeUnfocusPixmap().pixmap().drawable(); break; - case SHADE: + case SHADE: if (m_listen_to.isShaded()) { if (focused) return m_theme.unshadePixmap().pixmap().drawable(); @@ -245,7 +244,7 @@ void WinButton::drawType() { } break; case CLOSE: - drawLine(gc(), + drawLine(gc(), 2, 2, width() - 3, height() - 3); // I can't figure out why this second one needs a y offset of 1????? @@ -259,23 +258,23 @@ void WinButton::drawType() { // XFree86 Version 4.3.0.1 (Debian 4.3.0.dfsg.1-1 20040428170728) // (X Protocol Version 11, Revision 0, Release 6.6) - drawLine(gc(), + drawLine(gc(), 2, height() - 3, width() - 3, 2); break; case SHADE: - + { int size = width() - 5 - oddW; drawRectangle(gc(), 2, 2, size, 2); - + // draw a one-quarter triangle below the rectangle drawTriangle(gc(), (m_listen_to.isShaded() ? FbTk::FbDrawable::DOWN: FbTk::FbDrawable::UP), - 4, 6, - size-2, size/2 - 1, + 4, 6, + size-2, size/2 - 1, 100); break; @@ -284,16 +283,16 @@ void WinButton::drawType() { if (m_icon_pixmap.drawable()) { if (m_icon_mask.drawable()) { - XSetClipMask(m_listen_to.fbWindow().display(), + XSetClipMask(m_listen_to.fbWindow().display(), gc(), m_icon_mask.drawable()); - XSetClipOrigin(m_listen_to.fbWindow().display(), + XSetClipOrigin(m_listen_to.fbWindow().display(), gc(), 2, 2); } - + copyArea(m_icon_pixmap.drawable(), gc(), - 0, 0, - 2, 2, + 0, 0, + 2, 2, m_icon_pixmap.width(), m_icon_pixmap.height()); if (m_icon_mask.drawable()) @@ -318,22 +317,22 @@ void WinButton::update(FbTk::Subject *subj) { // update the menu icon if (m_type == MENUICON && !m_listen_to.empty()) { - + Display* display = m_listen_to.fbWindow().display(); int screen = m_listen_to.screen().screenNumber(); if (m_listen_to.icon().pixmap().drawable() != None) { - m_icon_pixmap.copy(m_listen_to.icon().pixmap().drawable(), + m_icon_pixmap.copy(m_listen_to.icon().pixmap().drawable(), DefaultDepth(display, screen), screen); m_icon_pixmap.scale(width() - 4, height() - 4); } else m_icon_pixmap.release(); - + if (m_listen_to.icon().mask().drawable() != None) { m_icon_mask.copy(m_listen_to.icon().mask().drawable(), 0, 0); m_icon_mask.scale(width() - 4, height() - 4); } else m_icon_mask.release(); - + } // pressed_pixmap isn't stateful in any current buttons, so no need @@ -348,7 +347,6 @@ void WinButton::update(FbTk::Subject *subj) { if (p_pm != None) setPressedPixmap(p_pm); } - clear(); } diff --git a/src/WinClient.hh b/src/WinClient.hh index b52e8d2..2168543 100644 --- a/src/WinClient.hh +++ b/src/WinClient.hh @@ -24,10 +24,8 @@ #ifndef WINCLIENT_HH #define WINCLIENT_HH -#include "Focusable.hh" #include "Window.hh" -#include "Subject.hh" -#include "FbWindow.hh" +#include "FbTk/FbWindow.hh" #include "FbTk/FbString.hh" #include <X11/Xutil.h> diff --git a/src/Window.cc b/src/Window.cc index 909d8db..a6ea166 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -40,12 +40,12 @@ #include "WindowCmd.hh" #include "Remember.hh" #include "MenuCreator.hh" -#include "StringUtil.hh" #include "FocusControl.hh" #include "Layer.hh" #include "IconButton.hh" #include "ScreenPlacement.hh" +#include "FbTk/StringUtil.hh" #include "FbTk/Compose.hh" #include "FbTk/EventManager.hh" #include "FbTk/KeyUtil.hh" @@ -3706,11 +3706,11 @@ const string &FluxboxWindow::title() const { } const std::string &FluxboxWindow::getWMClassName() const { - return (m_client ? m_client->getWMClassName() : m_instance_name); + return (m_client ? m_client->getWMClassName() : getWMClassName()); } const std::string &FluxboxWindow::getWMClassClass() const { - return (m_client ? m_client->getWMClassClass() : m_class_name); + return (m_client ? m_client->getWMClassClass() : getWMClassClass()); } std::string FluxboxWindow::getWMRole() const { diff --git a/src/Window.hh b/src/Window.hh index c8e1509..19ce3ca 100644 --- a/src/Window.hh +++ b/src/Window.hh @@ -37,8 +37,6 @@ #include "Focusable.hh" #include "WinButton.hh" -#include <X11/Xlib.h> - #include <sys/time.h> #include <vector> #include <string> diff --git a/src/WorkspaceCmd.hh b/src/WorkspaceCmd.hh index 4169a49..9ad4d4f 100644 --- a/src/WorkspaceCmd.hh +++ b/src/WorkspaceCmd.hh @@ -24,15 +24,12 @@ #ifndef WORKSPACECMD_HH #define WORKSPACECMD_HH -#include "Command.hh" +#include "FbTk/Command.hh" +#include "FbTk/RefCount.hh" #include "ClientPattern.hh" #include "FocusControl.hh" -#include "FbTk/RefCount.hh" - -#include <string> - class WindowListCmd: public FbTk::Command { public: WindowListCmd(FbTk::RefCount<FbTk::Command> cmd, int opts, diff --git a/src/Xinerama.hh b/src/Xinerama.hh index 24b4ca1..18c99d6 100644 --- a/src/Xinerama.hh +++ b/src/Xinerama.hh @@ -25,13 +25,13 @@ #ifndef XINERAMA_HH #define XINERAMA_HH -#include "MenuItem.hh" #include "FbMenu.hh" -#include "RefCount.hh" -#include "SimpleCommand.hh" - #include "fluxbox.hh" +#include "FbTk/RefCount.hh" +#include "FbTk/SimpleCommand.hh" +#include "FbTk/MenuItem.hh" + // provides a generic way for giving an object a xinerama head menu // The object must have two functions: // int getOnHead(), and diff --git a/src/Xutil.cc b/src/Xutil.cc index 6a12071..30a6d1d 100644 --- a/src/Xutil.cc +++ b/src/Xutil.cc @@ -26,17 +26,10 @@ #include "FbTk/I18n.hh" #include "FbTk/App.hh" -#include "FbTk/FbString.hh" #include <X11/Xutil.h> #include <X11/Xatom.h> -#include <X11/Xlib.h> #include <iostream> -#ifdef HAVE_CSTRING - #include <cstring> -#else - #include <string.h> -#endif using std::string; diff --git a/src/Xutil.hh b/src/Xutil.hh index 3d800a7..ce3bead 100644 --- a/src/Xutil.hh +++ b/src/Xutil.hh @@ -28,8 +28,6 @@ #include <X11/Xlib.h> #include "FbTk/FbString.hh" -#include <string> - namespace Xutil { FbTk::FbString getWMName(Window window); diff --git a/src/fluxbox.hh b/src/fluxbox.hh index a6544e3..8dac8ed 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh @@ -24,8 +24,8 @@ // $Id$ -#ifndef FLUXBOX_HH -#define FLUXBOX_HH +#ifndef FLUXBOX_HH +#define FLUXBOX_HH #include "FbTk/App.hh" #include "FbTk/Resource.hh" @@ -34,7 +34,6 @@ #include "FbTk/SignalHandler.hh" #include "AttentionNoticeHandler.hh" -#include <X11/Xlib.h> #include <X11/Xresource.h> #ifdef HAVE_CSTDIO @@ -51,7 +50,7 @@ #include <sys/time.h> #include <time.h> #else // !TIME_WITH_SYS_TIME -#ifdef HAVE_SYS_TIME_H +#ifdef HAVE_SYS_TIME_H #include <sys/time.h> #else // !HAVE_SYS_TIME_H #include <time.h> @@ -73,9 +72,9 @@ class FbAtoms; class Toolbar; -/// main class for the window manager. +/// main class for the window manager. /** - singleton type + singleton type */ class Fluxbox : public FbTk::App, public FbTk::SignalEventHandler, -- cgit v0.11.2