all repos — fluxbox @ 9d5e2f143ba2dc33c5f79a1a18646512b04c942d

custom fork of the fluxbox windowmanager

add session.screenN.defaultDeco: <bitmask> to the apps file
markt markt
commit

9d5e2f143ba2dc33c5f79a1a18646512b04c942d

parent

6d4d17b5f95915396fd1e04ef068d2df1f95bf35

6 files changed, 20 insertions(+), 16 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,10 @@

(Format: Year/Month/Day) Changes for 1.0rc3: *07/01/04: + * Added new resource for init file to control default window decorations: + session.screenN.defaultDeco: <bitmask>, where the bitmask corresponds + to the one used for [Deco] in the apps file (Mark) + Screen.cc/hh Window.cc/hh doc/asciidoc/fluxbox.txt * Move minimized windows to the back of the focused list (Mark) Window.cc FocusControl.cc/hh *07/01/03:
M doc/asciidoc/fluxbox.txtdoc/asciidoc/fluxbox.txt

@@ -946,6 +946,11 @@ session.screen0.decorateTransient: <boolean>

This controls whether or not transient windows get window decorations, such as a titlebar. Default: False +session.screen0.defaultDeco: <bitmask> + This specifies the default window decorations, according to the same + bitmask as used by the `[Deco]' option in the `apps' file, described later + in this document. Default: all bits set. + session.screen0.menuMode: Delay|Click This setting controls the circumstances under which submenus open. With `Click', the user must click on the menu item in order for the submenu to
M src/Screen.ccsrc/Screen.cc

@@ -270,6 +270,7 @@ show_window_pos(rm, true, scrname+".showwindowposition", altscrname+".ShowWindowPosition"),

auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"), click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), decorate_transient(rm, false, scrname+".decorateTransient", altscrname+".DecorateTransient"), + default_deco(rm, FluxboxWindow::DECORM_LAST-1, scrname+".defaultDeco", altscrname+".DefaultDeco"), rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), resize_model(rm, BOTTOMRESIZE, scrname+".resizeMode", altscrname+".ResizeMode"), tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"),
M src/Screen.hhsrc/Screen.hh

@@ -120,6 +120,7 @@ bool doOpaqueMove() const { return *resource.opaque_move; }

bool doFullMax() const { return *resource.full_max; } bool doShowWindowPos() const { return *resource.show_window_pos; } bool decorateTransient() const { return *resource.decorate_transient; } + unsigned int defaultDeco() const { return *resource.default_deco; } const std::string &windowMenuFilename() const { return *resource.windowmenufile; } FbTk::ImageControl &imageControl() { return *m_image_control.get(); } // menus

@@ -440,7 +441,8 @@ FbTk::Resource<bool> image_dither, opaque_move, full_max,

workspace_warping, desktop_wheeling, reverse_wheeling, show_window_pos, auto_raise, click_raises, decorate_transient; - FbTk::Resource<std::string> rootcommand; + FbTk::Resource<unsigned int> default_deco; + FbTk::Resource<std::string> rootcommand; FbTk::Resource<ResizeModel> resize_model; FbTk::Resource<FbWinFrame::TabPlacement> tab_placement; FbTk::Resource<std::string> windowmenufile;
M src/Window.ccsrc/Window.cc

@@ -447,18 +447,8 @@ m_blackbox_attrib.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0;

m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0; m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0; - //use tab as default - decorations.tab = true; - // enable decorations - decorations.enabled = true; - - // set default values for decoration - decorations.menu = true; //override menu option - // all decorations on by default - decorations.titlebar = decorations.border = decorations.handle = true; - decorations.maximize = decorations.close = - decorations.sticky = decorations.shade = decorations.tab = true; - + // set default decorations but don't apply them + setDecorationMask(screen().defaultDeco(), false); functions.resize = functions.move = functions.iconify = functions.maximize = functions.close = functions.tabable = true; decorations.close = false;

@@ -3298,7 +3288,7 @@ ret |= DECORM_ENABLED;

return ret; } -void FluxboxWindow::setDecorationMask(unsigned int mask) { +void FluxboxWindow::setDecorationMask(unsigned int mask, bool apply) { decorations.titlebar = mask & DECORM_TITLEBAR; decorations.handle = mask & DECORM_HANDLE; decorations.border = mask & DECORM_BORDER;

@@ -3310,7 +3300,9 @@ decorations.sticky = mask & DECORM_STICKY;

decorations.shade = mask & DECORM_SHADE; decorations.tab = mask & DECORM_TAB; decorations.enabled = mask & DECORM_ENABLED; - applyDecorations(); + // we don't want to do this during initialization + if (apply) + applyDecorations(); } void FluxboxWindow::startMoving(int x, int y) {
M src/Window.hhsrc/Window.hh

@@ -281,7 +281,7 @@ void applyDecorations(bool initial = false);

void toggleDecoration(); unsigned int decorationMask() const; - void setDecorationMask(unsigned int mask); + void setDecorationMask(unsigned int mask, bool apply = true); /** * Start moving process, grabs the pointer and draws move rectangle * @param x position of pointer