aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-04-20 13:46:18 (GMT)
committerfluxgen <fluxgen>2003-04-20 13:46:18 (GMT)
commit671fdb606f13db76349f4abd886aff21230c8618 (patch)
treeda5e261d4babce46753ea3c4a584214903a40413 /src/Screen.cc
parent74792af1cc9d7507be77e664367bd1792cb0870b (diff)
downloadfluxbox_pavel-671fdb606f13db76349f4abd886aff21230c8618.zip
fluxbox_pavel-671fdb606f13db76349f4abd886aff21230c8618.tar.bz2
root pixmap and menu alpha item
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 574c51a..c8275a0 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.128 2003/04/20 12:21:35 rathnor Exp $ 25// $Id: Screen.cc,v 1.129 2003/04/20 13:46:18 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -48,6 +48,7 @@
48#include "FbMenu.hh" 48#include "FbMenu.hh"
49#include "LayerMenu.hh" 49#include "LayerMenu.hh"
50#include "WinClient.hh" 50#include "WinClient.hh"
51#include "Subject.hh"
51 52
52//use GNU extensions 53//use GNU extensions
53#ifndef _GNU_SOURCE 54#ifndef _GNU_SOURCE
@@ -475,6 +476,7 @@ BScreen::ScreenResource::ScreenResource(ResourceManager &rm,
475 toolbar_width_percent(rm, 65, 476 toolbar_width_percent(rm, 65,
476 scrname+".toolbar.widthPercent", altscrname+".Toolbar.WidthPercent"), 477 scrname+".toolbar.widthPercent", altscrname+".Toolbar.WidthPercent"),
477 edge_snap_threshold(rm, 0, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"), 478 edge_snap_threshold(rm, 0, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"),
479 menu_alpha(rm, 255, scrname+".menuAlpha", altscrname+".MenuAlpha"),
478 slit_layernum(rm, Fluxbox::Layer(Fluxbox::instance()->getDockLayer()), 480 slit_layernum(rm, Fluxbox::Layer(Fluxbox::instance()->getDockLayer()),
479 scrname+".slit.layer", altscrname+".Slit.Layer"), 481 scrname+".slit.layer", altscrname+".Slit.Layer"),
480 toolbar_layernum(rm, Fluxbox::Layer(Fluxbox::instance()->getDesktopLayer()), 482 toolbar_layernum(rm, Fluxbox::Layer(Fluxbox::instance()->getDesktopLayer()),
@@ -543,6 +545,22 @@ BScreen::BScreen(ResourceManager &rm,
543 (unsigned char *) &bpid, 1); 545 (unsigned char *) &bpid, 1);
544#endif // HAVE_GETPID 546#endif // HAVE_GETPID
545 547
548 Atom real_type;
549 int real_format;
550 unsigned long items_read, items_left;
551 unsigned int *data;
552 if (XGetWindowProperty(disp, getRootWindow(),
553 XInternAtom(disp, "_XROOTPMAP_ID", false),
554 0L, 1L,
555 false, XA_PIXMAP, &real_type,
556 &real_format, &items_read, &items_left,
557 (unsigned char **) &data) == Success &&
558 items_read) {
559 m_root_pm = (Pixmap) (*data);
560 XFree(data);
561 } else
562 m_root_pm = 0;
563
546 cycling_window = focused_list.end(); 564 cycling_window = focused_list.end();
547 565
548 XDefineCursor(disp, getRootWindow(), fluxbox->getSessionCursor()); 566 XDefineCursor(disp, getRootWindow(), fluxbox->getSessionCursor());
@@ -554,7 +572,7 @@ BScreen::BScreen(ResourceManager &rm,
554 root_colormap_installed = true; 572 root_colormap_installed = true;
555 573
556 fluxbox->load_rc(*this); 574 fluxbox->load_rc(*this);
557 575 FbTk::Menu::setAlpha(*resource.menu_alpha);
558 image_control->setDither(*resource.image_dither); 576 image_control->setDither(*resource.image_dither);
559 theme = new Theme(disp, getRootWindow(), colormap(), getScreenNumber(), 577 theme = new Theme(disp, getRootWindow(), colormap(), getScreenNumber(),
560 fluxbox->getStyleFilename().c_str(), getRootCommand().c_str()); 578 fluxbox->getStyleFilename().c_str(), getRootCommand().c_str());
@@ -791,6 +809,7 @@ void BScreen::reconfigure() {
791#ifdef DEBUG 809#ifdef DEBUG
792 cerr<<__FILE__<<"("<<__LINE__<<"): BScreen::reconfigure"<<endl; 810 cerr<<__FILE__<<"("<<__LINE__<<"): BScreen::reconfigure"<<endl;
793#endif // DEBUG 811#endif // DEBUG
812 FbTk::Menu::setAlpha(*resource.menu_alpha);
794 Fluxbox::instance()->loadRootCommand(*this); 813 Fluxbox::instance()->loadRootCommand(*this);
795 theme->setRootCommand(getRootCommand()); 814 theme->setRootCommand(getRootCommand());
796 const string &filename = Fluxbox::instance()->getStyleFilename(); 815 const string &filename = Fluxbox::instance()->getStyleFilename();
@@ -2126,11 +2145,17 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
2126 2145
2127 menu.insert(new BoolMenuItem("Click Raises", 2146 menu.insert(new BoolMenuItem("Click Raises",
2128 *resource.click_raises, 2147 *resource.click_raises,
2129 save_and_reconfigure)); 2148 save_and_reconfigure));
2130 // setup antialias cmd to reload style and save resource on toggle 2149 // setup antialias cmd to reload style and save resource on toggle
2131 menu.insert(new BoolMenuItem("antialias", *resource.antialias, 2150 menu.insert(new BoolMenuItem("antialias", *resource.antialias,
2132 save_and_reconfigure)); 2151 save_and_reconfigure));
2133 2152
2153 FbTk::MenuItem *menu_alpha_item = new IntResMenuItem("Menu Alpha", resource.menu_alpha,
2154 0, 255);
2155 menu_alpha_item->setCommand(saverc_cmd);
2156 menu.insert(menu_alpha_item);
2157
2158
2134 2159
2135 // finaly update menu 2160 // finaly update menu
2136 menu.update(); 2161 menu.update();