all repos — openbox @ 28b8f67562bb7eb15134f2bf7a8394f0a009b9ba

openbox fork - make it a bit more like ryudo

remove the word "sticky" from everywhere, and replace with "all desktops". change the titlebar layout to use D instead of S for the all-desktops button
Dana Jansens danakj@orodu.net
commit

28b8f67562bb7eb15134f2bf7a8394f0a009b9ba

parent

7b7ae097a0d389a35967fdab4ea310effcfc42c2

M data/styles/Makefile.amdata/styles/Makefile.am

@@ -1,9 +1,10 @@

styledir = $(pkgdatadir)/styles MAINTAINERCLEANFILES = Makefile.in -style_DATA = artwiz bbs bluebox cthulhain deep fieron fieron2 flux frobozz \ - frobust mbdtex miklos nyz nyzclone ob20 operation outcomes paper \ - purplehaaze shade steelblue steelblue2 the_orange trisb twice \ - warp-xp +style_DATA = +#artwiz bbs bluebox cthulhain deep fieron fieron2 flux frobozz \ +#frobust mbdtex miklos nyz nyzclone ob20 operation outcomes paper \ +#purplehaaze shade steelblue steelblue2 the_orange trisb twice \ +#warp-xp EXTRA_DIST = $(style_DATA) distclean-local:
M otk/renderstyle.ccotk/renderstyle.cc

@@ -192,12 +192,12 @@ display->screenInfo(_screen)->rootWindow(),

data, 8, 8); } - _stick_mask = new PixmapMask(); - _stick_mask->w = _stick_mask->h = 8; + _alldesk_mask = new PixmapMask(); + _alldesk_mask->w = _alldesk_mask->h = 8; { //char data[] = { 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00 }; char data[] = { 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x00 }; - _stick_mask->mask = + _alldesk_mask->mask = XCreateBitmapFromData(**display, display->screenInfo(_screen)->rootWindow(), data, 8, 8);

@@ -252,7 +252,7 @@ delete _label_font;

delete _max_mask; delete _icon_mask; - delete _stick_mask; + delete _alldesk_mask; delete _close_mask; }
M otk/renderstyle.hhotk/renderstyle.hh

@@ -63,7 +63,7 @@ TextJustify _label_justify;

PixmapMask *_max_mask; PixmapMask *_icon_mask; - PixmapMask *_stick_mask; + PixmapMask *_alldesk_mask; PixmapMask *_close_mask; int _handle_width;

@@ -120,7 +120,7 @@ inline TextJustify labelTextJustify() const { return _label_justify; }

inline PixmapMask *maximizeMask() const { return _max_mask; } inline PixmapMask *iconifyMask() const { return _icon_mask; } - inline PixmapMask *stickyMask() const { return _stick_mask; } + inline PixmapMask *alldesktopsMask() const { return _alldesk_mask; } inline PixmapMask *closeMask() const { return _close_mask; } inline int handleWidth() const { return _handle_width; }
M otk/rendertexture.hhotk/rendertexture.hh

@@ -109,16 +109,19 @@ _bevel_light_color = new RenderColor(screen, r, g, b);

} assert(_relief == Flat || (_bevel_dark_color && _bevel_light_color)); - assert(!_border || _border_color); - assert(!_interlaced || _interlace_color); + //assert(!_border || _border_color); + //assert(!_interlaced || _interlace_color); assert(_color); + assert(_secondary_color); + assert(_border_color); + assert(_interlace_color); } virtual ~RenderTexture() { delete _color; delete _secondary_color; if (_bevel_dark_color) delete _bevel_dark_color; - if (_bevel_dark_color) delete _bevel_light_color; + if (_bevel_dark_color) delete _bevel_light_color; delete _border_color; delete _interlace_color; }
M scripts/builtins.pyscripts/builtins.py

@@ -262,7 +262,7 @@ mbind("Left", MC_Titlebar, MouseDoubleClick, toggle_shade)

def setup_window_buttons(): """Sets up the default behaviors for the buttons in the window titlebar.""" - mbind("Left", MC_StickyButton, MouseClick, toggle_all_desktops) + mbind("Left", MC_AllDesktopsButton, MouseClick, toggle_all_desktops) mbind("Left", MC_CloseButton, MouseClick, close) def setup_scroll():
M scripts/config.pyscripts/config.py

@@ -14,10 +14,10 @@

# titlebar_layout - the layout of the buttons/label on client titlebars, can be # made up of the following: # I - iconify button, L - text label, M - maximize button, -# S - sticky button, C - close button +# D - all-desktops button, C - close button # If no 'L' is included in the string, one will be added to # the end by Openbox. -titlebar_layout = "ILMC" +titlebar_layout = "DILMC" # double_click_delay - the number of milliseconds in which 2 clicks are # perceived as a double-click.
M src/buttonwidget.ccsrc/buttonwidget.cc

@@ -32,7 +32,7 @@ {

bool p = _pressed; switch (type()) { - case Type_StickyButton: + case Type_AllDesktopsButton: if (_client->desktop() == (signed)0xffffffff) p = true; break;

@@ -52,7 +52,7 @@ setTexture(_style->gripFocusBackground());

else setTexture(_style->gripUnfocusBackground()); break; - case Type_StickyButton: + case Type_AllDesktopsButton: case Type_MaximizeButton: case Type_CloseButton: case Type_IconifyButton:

@@ -84,7 +84,7 @@ case Type_LeftGrip:

case Type_RightGrip: setBorderColor(_style->frameBorderColor()); break; - case Type_StickyButton: + case Type_AllDesktopsButton: case Type_CloseButton: case Type_MaximizeButton: case Type_IconifyButton:

@@ -98,7 +98,7 @@

void ButtonWidget::update() { switch (type()) { - case Type_StickyButton: + case Type_AllDesktopsButton: if ((_client->desktop() == (signed)0xffffffff) != _state) { _state = !_state; setTextures();

@@ -128,8 +128,8 @@ otk::Widget::renderForeground();

if (draw) { switch (type()) { - case Type_StickyButton: - pm = _style->stickyMask(); + case Type_AllDesktopsButton: + pm = _style->alldesktopsMask(); break; case Type_CloseButton: pm = _style->closeMask();
M src/client.ccsrc/client.cc

@@ -169,8 +169,8 @@

void Client::setupDecorAndFunctions() { // start with everything (cept fullscreen) - _decorations = Decor_Titlebar | Decor_Handle | Decor_Border | Decor_Sticky | - Decor_Iconify | Decor_Maximize; + _decorations = Decor_Titlebar | Decor_Handle | Decor_Border | + Decor_AllDesktops | Decor_Iconify | Decor_Maximize; _functions = Func_Resize | Func_Move | Func_Iconify | Func_Maximize | Func_Shade;
M src/client.hhsrc/client.hh

@@ -89,7 +89,7 @@ //! Possible window types

enum WindowType { Type_Desktop, //!< A desktop (bottom-most window) Type_Dock, //!< A dock bar/panel window Type_Toolbar, //!< A toolbar window, pulled off an app - Type_Menu, //!< A sticky menu from an app + Type_Menu, //!< An unpinned menu from an app Type_Utility, //!< A small utility window such as a palette Type_Splash, //!< A splash screen window Type_Dialog, //!< A dialog window

@@ -133,13 +133,15 @@ //! Holds a bitmask of Client::Function values

typedef unsigned char FunctionFlags; //! The decorations the client window wants to be displayed on it - enum Decoration { Decor_Titlebar = 1 << 0, //!< Display a titlebar - Decor_Handle = 1 << 1, //!< Display a handle (bottom) - Decor_Border = 1 << 2, //!< Display a border - Decor_Iconify = 1 << 3, //!< Display an iconify button - Decor_Maximize = 1 << 4, //!< Display a maximize button - Decor_Sticky = 1 << 5, //!< Display a sticky button - Decor_Close = 1 << 6 //!< Display a close button + enum Decoration { Decor_Titlebar = 1 << 0, //!< Display a titlebar + Decor_Handle = 1 << 1, //!< Display a handle (bottom) + Decor_Border = 1 << 2, //!< Display a border + Decor_Iconify = 1 << 3, //!< Display an iconify button + Decor_Maximize = 1 << 4, //!< Display a maximize button + //! Display a button to toggle the window's placement on + //! all desktops + Decor_AllDesktops = 1 << 5, + Decor_Close = 1 << 6 //!< Display a close button }; //! Holds a bitmask of Client::Decoration values typedef unsigned char DecorationFlags;
M src/frame.ccsrc/frame.cc

@@ -33,7 +33,7 @@ _titlebar(this, WidgetBase::Type_Titlebar),

_button_close(&_titlebar, WidgetBase::Type_CloseButton, client), _button_iconify(&_titlebar, WidgetBase::Type_IconifyButton, client), _button_max(&_titlebar, WidgetBase::Type_MaximizeButton, client), - _button_stick(&_titlebar, WidgetBase::Type_StickyButton, client), + _button_alldesk(&_titlebar, WidgetBase::Type_AllDesktopsButton, client), _label(&_titlebar, WidgetBase::Type_Label), _handle(this, WidgetBase::Type_Handle), _grip_left(&_handle, WidgetBase::Type_LeftGrip, client),

@@ -164,8 +164,8 @@ if (_decorations & Client::Decor_Iconify)

_button_iconify.setGeometry(0, bevel + 1, butsize, butsize); if (_decorations & Client::Decor_Maximize) _button_max.setGeometry(0, bevel + 1, butsize, butsize); - if (_decorations & Client::Decor_Sticky) - _button_stick.setGeometry(0, bevel + 1, butsize, butsize); + if (_decorations & Client::Decor_AllDesktops) + _button_alldesk.setGeometry(0, bevel + 1, butsize, butsize); if (_decorations & Client::Decor_Close) _button_close.setGeometry(0, bevel + 1, butsize, butsize);

@@ -204,9 +204,9 @@ tit_m = true;

continue; } break; - case 's': - case 'S': - if (!tit_s && (_decorations & Client::Decor_Sticky)) { + case 'd': + case 'D': + if (!tit_s && (_decorations & Client::Decor_AllDesktops)) { tit_s = true; continue; }

@@ -255,10 +255,10 @@ case 'M':

_button_max.move(x, _button_max.rect().y()); x += _button_max.width(); break; - case 's': - case 'S': - _button_stick.move(x, _button_stick.rect().y()); - x += _button_stick.width(); + case 'd': + case 'D': + _button_alldesk.move(x, _button_alldesk.rect().y()); + x += _button_alldesk.width(); break; case 'c': case 'C':

@@ -278,15 +278,11 @@ _innersize.top + _client->area().height() + cbwidth,

width, _style->handleWidth()); _grip_left.setGeometry(-bwidth, -bwidth, - // XXX: get a Point class in otk and use that for - // the 'buttons size' since theyre all the same butsize * 2, _handle.height()); _grip_right.setGeometry(((_handle.rect().right() + 1) - butsize * 2), -bwidth, - // XXX: get a Point class in otk and use that for - // the 'buttons size' since theyre all the same butsize * 2, _handle.height()); _innersize.bottom += _handle.height() + bwidth;

@@ -317,9 +313,9 @@ _button_max.show();

else _button_max.hide(); if (tit_s) - _button_stick.show(); + _button_alldesk.show(); else - _button_stick.hide(); + _button_alldesk.hide(); if (tit_c) _button_close.show(); else

@@ -401,7 +397,7 @@

void Frame::adjustState() { - _button_stick.update(); + _button_alldesk.update(); _button_max.update(); }
M src/frame.hhsrc/frame.hh

@@ -52,7 +52,7 @@ BackgroundWidget _titlebar;

ButtonWidget _button_close; ButtonWidget _button_iconify; ButtonWidget _button_max; - ButtonWidget _button_stick; + ButtonWidget _button_alldesk; LabelWidget _label; BackgroundWidget _handle; ButtonWidget _grip_left;

@@ -132,8 +132,8 @@ //! Gets the window id of the frame's "iconify button" subelement

inline Window button_iconify() const { return _button_iconify.window(); } //! Gets the window id of the frame's "maximize button" subelement inline Window button_max() const { return _button_max.window(); } - //! Gets the window id of the frame's "sticky button" subelement - inline Window button_stick() const { return _button_stick.window(); } + //! Gets the window id of the frame's "all desktops button" subelement + inline Window button_alldesk() const { return _button_alldesk.window(); } //! Gets the window id of the frame's "handle" subelement inline Window handle() const { return _handle.window(); } //! Gets the window id of the frame's "left grip" subelement
M src/openbox.pysrc/openbox.py

@@ -773,7 +773,7 @@ Decor_Handle = _openbox.Client_Decor_Handle

Decor_Border = _openbox.Client_Decor_Border Decor_Iconify = _openbox.Client_Decor_Iconify Decor_Maximize = _openbox.Client_Decor_Maximize - Decor_Sticky = _openbox.Client_Decor_Sticky + Decor_AllDesktops = _openbox.Client_Decor_AllDesktops Decor_Close = _openbox.Client_Decor_Close State_Remove = _openbox.Client_State_Remove State_Add = _openbox.Client_State_Add

@@ -869,7 +869,7 @@ def label(*args): return apply(_openbox.Frame_label,args)

def button_close(*args): return apply(_openbox.Frame_button_close,args) def button_iconify(*args): return apply(_openbox.Frame_button_iconify,args) def button_max(*args): return apply(_openbox.Frame_button_max,args) - def button_stick(*args): return apply(_openbox.Frame_button_stick,args) + def button_alldesk(*args): return apply(_openbox.Frame_button_alldesk,args) def handle(*args): return apply(_openbox.Frame_handle,args) def grip_left(*args): return apply(_openbox.Frame_grip_left,args) def grip_right(*args): return apply(_openbox.Frame_grip_right,args)

@@ -890,7 +890,7 @@ MC_Window = _openbox.MC_Window

MC_MaximizeButton = _openbox.MC_MaximizeButton MC_CloseButton = _openbox.MC_CloseButton MC_IconifyButton = _openbox.MC_IconifyButton -MC_StickyButton = _openbox.MC_StickyButton +MC_AllDesktopsButton = _openbox.MC_AllDesktopsButton MC_Grip = _openbox.MC_Grip MC_Root = _openbox.MC_Root MC_MenuItem = _openbox.MC_MenuItem
M src/openbox_wrap.ccsrc/openbox_wrap.cc

@@ -9975,15 +9975,15 @@ return NULL;

} -static PyObject *_wrap_Frame_button_stick(PyObject *self, PyObject *args) { +static PyObject *_wrap_Frame_button_alldesk(PyObject *self, PyObject *args) { PyObject *resultobj; ob::Frame *arg1 = (ob::Frame *) 0 ; Window result; PyObject * obj0 = 0 ; - if(!PyArg_ParseTuple(args,(char *)"O:Frame_button_stick",&obj0)) goto fail; + if(!PyArg_ParseTuple(args,(char *)"O:Frame_button_alldesk",&obj0)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Frame,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - result = (Window)((ob::Frame const *)arg1)->button_stick(); + result = (Window)((ob::Frame const *)arg1)->button_alldesk(); resultobj = PyInt_FromLong((long)result); return resultobj;

@@ -11724,7 +11724,7 @@ { (char *)"Frame_label", _wrap_Frame_label, METH_VARARGS },

{ (char *)"Frame_button_close", _wrap_Frame_button_close, METH_VARARGS }, { (char *)"Frame_button_iconify", _wrap_Frame_button_iconify, METH_VARARGS }, { (char *)"Frame_button_max", _wrap_Frame_button_max, METH_VARARGS }, - { (char *)"Frame_button_stick", _wrap_Frame_button_stick, METH_VARARGS }, + { (char *)"Frame_button_alldesk", _wrap_Frame_button_alldesk, METH_VARARGS }, { (char *)"Frame_handle", _wrap_Frame_handle, METH_VARARGS }, { (char *)"Frame_grip_left", _wrap_Frame_grip_left, METH_VARARGS }, { (char *)"Frame_grip_right", _wrap_Frame_grip_right, METH_VARARGS },

@@ -12018,7 +12018,7 @@ { SWIG_PY_INT, (char *)"Client_Decor_Handle", (long) ob::Client::Decor_Handle, 0, 0, 0},

{ SWIG_PY_INT, (char *)"Client_Decor_Border", (long) ob::Client::Decor_Border, 0, 0, 0}, { SWIG_PY_INT, (char *)"Client_Decor_Iconify", (long) ob::Client::Decor_Iconify, 0, 0, 0}, { SWIG_PY_INT, (char *)"Client_Decor_Maximize", (long) ob::Client::Decor_Maximize, 0, 0, 0}, -{ SWIG_PY_INT, (char *)"Client_Decor_Sticky", (long) ob::Client::Decor_Sticky, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"Client_Decor_AllDesktops", (long) ob::Client::Decor_AllDesktops, 0, 0, 0}, { SWIG_PY_INT, (char *)"Client_Decor_Close", (long) ob::Client::Decor_Close, 0, 0, 0}, { SWIG_PY_INT, (char *)"Client_State_Remove", (long) ob::Client::State_Remove, 0, 0, 0}, { SWIG_PY_INT, (char *)"Client_State_Add", (long) ob::Client::State_Add, 0, 0, 0},

@@ -12033,7 +12033,7 @@ { SWIG_PY_INT, (char *)"MC_Window", (long) ob::MC_Window, 0, 0, 0},

{ SWIG_PY_INT, (char *)"MC_MaximizeButton", (long) ob::MC_MaximizeButton, 0, 0, 0}, { SWIG_PY_INT, (char *)"MC_CloseButton", (long) ob::MC_CloseButton, 0, 0, 0}, { SWIG_PY_INT, (char *)"MC_IconifyButton", (long) ob::MC_IconifyButton, 0, 0, 0}, -{ SWIG_PY_INT, (char *)"MC_StickyButton", (long) ob::MC_StickyButton, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"MC_AllDesktopsButton", (long) ob::MC_AllDesktopsButton, 0, 0, 0}, { SWIG_PY_INT, (char *)"MC_Grip", (long) ob::MC_Grip, 0, 0, 0}, { SWIG_PY_INT, (char *)"MC_Root", (long) ob::MC_Root, 0, 0, 0}, { SWIG_PY_INT, (char *)"MC_MenuItem", (long) ob::MC_MenuItem, 0, 0, 0},
M src/python.hhsrc/python.hh

@@ -32,7 +32,7 @@ MC_Window,

MC_MaximizeButton, MC_CloseButton, MC_IconifyButton, - MC_StickyButton, + MC_AllDesktopsButton, MC_Grip, MC_Root, MC_MenuItem,
M src/screen.ccsrc/screen.cc

@@ -478,7 +478,7 @@ openbox->addClient(client->frame->titlebar(), client);

openbox->addClient(client->frame->label(), client); openbox->addClient(client->frame->button_max(), client); openbox->addClient(client->frame->button_iconify(), client); - openbox->addClient(client->frame->button_stick(), client); + openbox->addClient(client->frame->button_alldesk(), client); openbox->addClient(client->frame->button_close(), client); openbox->addClient(client->frame->handle(), client); openbox->addClient(client->frame->grip_left(), client);

@@ -543,7 +543,7 @@ openbox->removeClient(frame->titlebar());

openbox->removeClient(frame->label()); openbox->removeClient(frame->button_max()); openbox->removeClient(frame->button_iconify()); - openbox->removeClient(frame->button_stick()); + openbox->removeClient(frame->button_alldesk()); openbox->removeClient(frame->button_close()); openbox->removeClient(frame->handle()); openbox->removeClient(frame->grip_left());
M src/widgetbase.hhsrc/widgetbase.hh

@@ -17,7 +17,7 @@ Type_Label,

Type_MaximizeButton, Type_CloseButton, Type_IconifyButton, - Type_StickyButton, + Type_AllDesktopsButton, Type_LeftGrip, Type_RightGrip, Type_Client,

@@ -50,8 +50,8 @@ case Type_CloseButton:

return MC_CloseButton; case Type_IconifyButton: return MC_IconifyButton; - case Type_StickyButton: - return MC_StickyButton; + case Type_AllDesktopsButton: + return MC_AllDesktopsButton; case Type_LeftGrip: return MC_Grip; case Type_RightGrip: