// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-// Window.cc for Blackbox - an X11 Window manager
-// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh at debian.org>
-// Copyright (c) 1997 - 2000, 2002 Brad Hughes <bhughes at trolltech.com>
-//
-// 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
-// the rights to use, copy, modify, merge, publish, distribute, sublicense,
-// and/or sell copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-// DEALINGS IN THE SOFTWARE.
#ifdef HAVE_CONFIG_H
# include "../config.h"
BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
screen->getWindowStyle()->b_pic_unfocus);
-#ifdef BITMAPBUTTONS
PixmapMask pm = screen->getWindowStyle()->icon_button;
if (screen->getWindowStyle()->icon_button.mask != None) {
XSetClipMask(blackbox->getXDisplay(), pen.gc(), None);
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0);
} else {
-#endif // BITMAPBUTTONS
XDrawRectangle(blackbox->getXDisplay(), frame.iconify_button, pen.gc(),
2, (frame.button_w - 5), (frame.button_w - 5), 2);
-#ifdef BITMAPBUTTONS
}
-#endif // BITMAPBUTTONS
}
BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
screen->getWindowStyle()->b_pic_unfocus);
-#ifdef BITMAPBUTTONS
PixmapMask pm = screen->getWindowStyle()->max_button;
if (pm.mask != None) {
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0 );
XSetClipMask( blackbox->getXDisplay(), pen.gc(), None );
} else {
-#endif // BITMAPBUTTONS
XDrawRectangle(blackbox->getXDisplay(), frame.maximize_button, pen.gc(),
2, 2, (frame.button_w - 5), (frame.button_w - 5));
XDrawLine(blackbox->getXDisplay(), frame.maximize_button, pen.gc(),
2, 3, (frame.button_w - 3), 3);
-#ifdef BITMAPBUTTONS
}
-#endif // BITMAPBUTTONS
}
BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
screen->getWindowStyle()->b_pic_unfocus);
-#ifdef BITMAPBUTTONS
PixmapMask pm = screen->getWindowStyle()->close_button;
if (pm.mask != None) {
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0 );
XSetClipMask( blackbox->getXDisplay(), pen.gc(), None );
} else {
-#endif // BITMAPBUTTONS
XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(),
2, 2, (frame.button_w - 3), (frame.button_w - 3));
XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(),
2, (frame.button_w - 3), (frame.button_w - 3), 2);
-#ifdef BITMAPBUTTONS
}
-#endif // BITMAPBUTTONS
}
void BlackboxWindow::redrawStickyButton(bool pressed) const {
BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
screen->getWindowStyle()->b_pic_unfocus);
-#ifdef BITMAPBUTTONS
PixmapMask pm = screen->getWindowStyle()->stick_button;
if (pm.mask != None) {
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0 );
XSetClipMask( blackbox->getXDisplay(), pen.gc(), None );
} else {
-#endif // BITMAPBUTTONS
XFillRectangle(blackbox->getXDisplay(), frame.stick_button, pen.gc(),
frame.button_w/2 - 1, frame.button_w/2 -1, 2, 2 );
-#ifdef BITMAPBUTTONS
}
-#endif
}
void BlackboxWindow::mapRequestEvent(const XMapRequestEvent *re) {