[openbox] [PATCH] New windows no decorations

Krešimir Špes kresimir.spes at gmail.com
Fri Jan 5 14:03:50 EST 2007


hhey, great stuff :) I was using devil's pie to achieve that effect 
until now :)



Mark Pustjens wrote:
> Hi everybody,
>
> This small patch allows you to choose wether you want to have window 
> decorations on new windows by default.
>
> Please let me know what you think.
>
> Greetings,
>
> Mark Pustjens
>
> ------------------------------------------------------------------------
>
> diff -Naur openbox-org/data/rc.xsd openbox-new/data/rc.xsd
> --- openbox-org/data/rc.xsd	2007-01-05 18:39:32.000000000 +0100
> +++ openbox-new/data/rc.xsd	2007-01-05 18:45:03.000000000 +0100
> @@ -109,6 +109,7 @@
>              <xs:element minOccurs="0" name="titleNumber" type="ob:bool"/>
>              <xs:element minOccurs="0" name="keepBorder" type="ob:bool"/>
>              <xs:element minOccurs="0" name="hideDisabled" type="ob:bool"/>
> +            <xs:element minOccurs="0" name="newNoDecorations" type="ob:bool"/>
>          </xs:sequence>
>      </xs:complexType>
>      <xs:complexType name="desktops">
> diff -Naur openbox-org/openbox/client.c openbox-new/openbox/client.c
> --- openbox-org/openbox/client.c	2007-01-05 18:39:33.000000000 +0100
> +++ openbox-new/openbox/client.c	2007-01-05 19:20:35.000000000 +0100
> @@ -1995,7 +1995,7 @@
>          self->fullscreen = FALSE;
>          client_fullscreen(self, TRUE, FALSE);
>      }
> -    if (self->undecorated) {
> +    if (self->undecorated || config_theme_newnodecorations) {
>          self->undecorated = FALSE;
>          client_set_undecorated(self, TRUE);
>      }
> diff -Naur openbox-org/openbox/config.c openbox-new/openbox/config.c
> --- openbox-org/openbox/config.c	2007-01-05 18:39:33.000000000 +0100
> +++ openbox-new/openbox/config.c	2007-01-05 18:47:08.000000000 +0100
> @@ -38,6 +38,7 @@
>  gchar   *config_theme;
>  gboolean config_theme_keepborder;
>  gboolean config_theme_hidedisabled;
> +gboolean config_theme_newnodecorations;
>  
>  gchar   *config_title_layout;
>  gboolean config_title_number;
> @@ -438,6 +439,8 @@
>          config_theme_keepborder = parse_bool(doc, n);
>      if ((n = parse_find_node("hideDisabled", node)))
>          config_theme_hidedisabled = parse_bool(doc, n);
> +    if ((n = parse_find_node("newNoDecorations", node)))
> +        config_theme_newnodecorations = parse_bool(doc, n);
>  }
>  
>  static void parse_desktops(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
> @@ -746,6 +749,7 @@
>      config_title_number = TRUE;
>      config_theme_keepborder = TRUE;
>      config_theme_hidedisabled = FALSE;
> +    config_theme_newnodecorations = FALSE;
>  
>      parse_register(i, "theme", parse_theme, NULL);
>  
> diff -Naur openbox-org/openbox/config.h openbox-new/openbox/config.h
> --- openbox-org/openbox/config.h	2007-01-05 18:39:33.000000000 +0100
> +++ openbox-new/openbox/config.h	2007-01-05 19:19:56.000000000 +0100
> @@ -88,6 +88,8 @@
>  extern gboolean config_theme_keepborder;
>  /*! Hide window frame buttons that the window doesn't allow */
>  extern gboolean config_theme_hidedisabled;
> +/*! Don't add window decorations to new windows */
> +extern gboolean config_theme_newnodecorations;
>  /*! Titlebar button layout */
>  extern gchar *config_title_layout;
>  /*! Append a unique number to windows with same titles */
>   




More information about the openbox mailing list