diff options
author | markt <markt> | 2007-01-04 19:13:55 (GMT) |
---|---|---|
committer | markt <markt> | 2007-01-04 19:13:55 (GMT) |
commit | 9d5e2f143ba2dc33c5f79a1a18646512b04c942d (patch) | |
tree | ee41281f87fc3df91d0c817c4a123591d0ba92c5 | |
parent | 6d4d17b5f95915396fd1e04ef068d2df1f95bf35 (diff) | |
download | fluxbox-9d5e2f143ba2dc33c5f79a1a18646512b04c942d.zip fluxbox-9d5e2f143ba2dc33c5f79a1a18646512b04c942d.tar.bz2 |
add session.screenN.defaultDeco: <bitmask> to the apps file
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/asciidoc/fluxbox.txt | 5 | ||||
-rw-r--r-- | src/Screen.cc | 1 | ||||
-rw-r--r-- | src/Screen.hh | 4 | ||||
-rw-r--r-- | src/Window.cc | 20 | ||||
-rw-r--r-- | src/Window.hh | 2 |
6 files changed, 20 insertions, 16 deletions
@@ -1,6 +1,10 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0rc3: | 2 | Changes for 1.0rc3: |
3 | *07/01/04: | 3 | *07/01/04: |
4 | * Added new resource for init file to control default window decorations: | ||
5 | session.screenN.defaultDeco: <bitmask>, where the bitmask corresponds | ||
6 | to the one used for [Deco] in the apps file (Mark) | ||
7 | Screen.cc/hh Window.cc/hh doc/asciidoc/fluxbox.txt | ||
4 | * Move minimized windows to the back of the focused list (Mark) | 8 | * Move minimized windows to the back of the focused list (Mark) |
5 | Window.cc FocusControl.cc/hh | 9 | Window.cc FocusControl.cc/hh |
6 | *07/01/03: | 10 | *07/01/03: |
diff --git a/doc/asciidoc/fluxbox.txt b/doc/asciidoc/fluxbox.txt index 6533e07..f5e2519 100644 --- a/doc/asciidoc/fluxbox.txt +++ b/doc/asciidoc/fluxbox.txt | |||
@@ -946,6 +946,11 @@ session.screen0.decorateTransient: <boolean> | |||
946 | This controls whether or not transient windows get window decorations, | 946 | This controls whether or not transient windows get window decorations, |
947 | such as a titlebar. Default: False | 947 | such as a titlebar. Default: False |
948 | 948 | ||
949 | session.screen0.defaultDeco: <bitmask> | ||
950 | This specifies the default window decorations, according to the same | ||
951 | bitmask as used by the `[Deco]' option in the `apps' file, described later | ||
952 | in this document. Default: all bits set. | ||
953 | |||
949 | session.screen0.menuMode: Delay|Click | 954 | session.screen0.menuMode: Delay|Click |
950 | This setting controls the circumstances under which submenus open. With | 955 | This setting controls the circumstances under which submenus open. With |
951 | `Click', the user must click on the menu item in order for the submenu to | 956 | `Click', the user must click on the menu item in order for the submenu to |
diff --git a/src/Screen.cc b/src/Screen.cc index 804321f..2e4a6dd 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -270,6 +270,7 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, | |||
270 | auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"), | 270 | auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"), |
271 | click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), | 271 | click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), |
272 | decorate_transient(rm, false, scrname+".decorateTransient", altscrname+".DecorateTransient"), | 272 | decorate_transient(rm, false, scrname+".decorateTransient", altscrname+".DecorateTransient"), |
273 | default_deco(rm, FluxboxWindow::DECORM_LAST-1, scrname+".defaultDeco", altscrname+".DefaultDeco"), | ||
273 | rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), | 274 | rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), |
274 | resize_model(rm, BOTTOMRESIZE, scrname+".resizeMode", altscrname+".ResizeMode"), | 275 | resize_model(rm, BOTTOMRESIZE, scrname+".resizeMode", altscrname+".ResizeMode"), |
275 | tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"), | 276 | tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"), |
diff --git a/src/Screen.hh b/src/Screen.hh index 1778308..739c458 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -120,6 +120,7 @@ public: | |||
120 | bool doFullMax() const { return *resource.full_max; } | 120 | bool doFullMax() const { return *resource.full_max; } |
121 | bool doShowWindowPos() const { return *resource.show_window_pos; } | 121 | bool doShowWindowPos() const { return *resource.show_window_pos; } |
122 | bool decorateTransient() const { return *resource.decorate_transient; } | 122 | bool decorateTransient() const { return *resource.decorate_transient; } |
123 | unsigned int defaultDeco() const { return *resource.default_deco; } | ||
123 | const std::string &windowMenuFilename() const { return *resource.windowmenufile; } | 124 | const std::string &windowMenuFilename() const { return *resource.windowmenufile; } |
124 | FbTk::ImageControl &imageControl() { return *m_image_control.get(); } | 125 | FbTk::ImageControl &imageControl() { return *m_image_control.get(); } |
125 | // menus | 126 | // menus |
@@ -440,7 +441,8 @@ private: | |||
440 | workspace_warping, | 441 | workspace_warping, |
441 | desktop_wheeling, reverse_wheeling, show_window_pos, | 442 | desktop_wheeling, reverse_wheeling, show_window_pos, |
442 | auto_raise, click_raises, decorate_transient; | 443 | auto_raise, click_raises, decorate_transient; |
443 | FbTk::Resource<std::string> rootcommand; | 444 | FbTk::Resource<unsigned int> default_deco; |
445 | FbTk::Resource<std::string> rootcommand; | ||
444 | FbTk::Resource<ResizeModel> resize_model; | 446 | FbTk::Resource<ResizeModel> resize_model; |
445 | FbTk::Resource<FbWinFrame::TabPlacement> tab_placement; | 447 | FbTk::Resource<FbWinFrame::TabPlacement> tab_placement; |
446 | FbTk::Resource<std::string> windowmenufile; | 448 | FbTk::Resource<std::string> windowmenufile; |
diff --git a/src/Window.cc b/src/Window.cc index f8b4457..523fd66 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -447,18 +447,8 @@ void FluxboxWindow::init() { | |||
447 | m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0; | 447 | m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0; |
448 | m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0; | 448 | m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0; |
449 | 449 | ||
450 | //use tab as default | 450 | // set default decorations but don't apply them |
451 | decorations.tab = true; | 451 | setDecorationMask(screen().defaultDeco(), false); |
452 | // enable decorations | ||
453 | decorations.enabled = true; | ||
454 | |||
455 | // set default values for decoration | ||
456 | decorations.menu = true; //override menu option | ||
457 | // all decorations on by default | ||
458 | decorations.titlebar = decorations.border = decorations.handle = true; | ||
459 | decorations.maximize = decorations.close = | ||
460 | decorations.sticky = decorations.shade = decorations.tab = true; | ||
461 | |||
462 | 452 | ||
463 | functions.resize = functions.move = functions.iconify = functions.maximize = functions.close = functions.tabable = true; | 453 | functions.resize = functions.move = functions.iconify = functions.maximize = functions.close = functions.tabable = true; |
464 | decorations.close = false; | 454 | decorations.close = false; |
@@ -3298,7 +3288,7 @@ unsigned int FluxboxWindow::decorationMask() const { | |||
3298 | return ret; | 3288 | return ret; |
3299 | } | 3289 | } |
3300 | 3290 | ||
3301 | void FluxboxWindow::setDecorationMask(unsigned int mask) { | 3291 | void FluxboxWindow::setDecorationMask(unsigned int mask, bool apply) { |
3302 | decorations.titlebar = mask & DECORM_TITLEBAR; | 3292 | decorations.titlebar = mask & DECORM_TITLEBAR; |
3303 | decorations.handle = mask & DECORM_HANDLE; | 3293 | decorations.handle = mask & DECORM_HANDLE; |
3304 | decorations.border = mask & DECORM_BORDER; | 3294 | decorations.border = mask & DECORM_BORDER; |
@@ -3310,7 +3300,9 @@ void FluxboxWindow::setDecorationMask(unsigned int mask) { | |||
3310 | decorations.shade = mask & DECORM_SHADE; | 3300 | decorations.shade = mask & DECORM_SHADE; |
3311 | decorations.tab = mask & DECORM_TAB; | 3301 | decorations.tab = mask & DECORM_TAB; |
3312 | decorations.enabled = mask & DECORM_ENABLED; | 3302 | decorations.enabled = mask & DECORM_ENABLED; |
3313 | applyDecorations(); | 3303 | // we don't want to do this during initialization |
3304 | if (apply) | ||
3305 | applyDecorations(); | ||
3314 | } | 3306 | } |
3315 | 3307 | ||
3316 | void FluxboxWindow::startMoving(int x, int y) { | 3308 | void FluxboxWindow::startMoving(int x, int y) { |
diff --git a/src/Window.hh b/src/Window.hh index b58a87a..142b451 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -281,7 +281,7 @@ public: | |||
281 | void toggleDecoration(); | 281 | void toggleDecoration(); |
282 | 282 | ||
283 | unsigned int decorationMask() const; | 283 | unsigned int decorationMask() const; |
284 | void setDecorationMask(unsigned int mask); | 284 | void setDecorationMask(unsigned int mask, bool apply = true); |
285 | /** | 285 | /** |
286 | * Start moving process, grabs the pointer and draws move rectangle | 286 | * Start moving process, grabs the pointer and draws move rectangle |
287 | * @param x position of pointer | 287 | * @param x position of pointer |