aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps2017-09-08 08:09:01 +1000
committerGitHub2017-09-08 08:09:01 +1000
commitf87b2ef98dc3de98c82e165dadffbbf1b3e9aa85 (patch)
treef5cb5545ac90f6e65b199dbaea366a5e7ea2e2f6
parent5129550979c3b1a89a9a2d902ceafc8fe8d5071d (diff)
parent06a4c8995b8d680773fa881bb9ca5515393e700a (diff)
downloadaur-openbox-patched.tar.gz
Merge pull request #7 from sphaugh/master
rounded-corners: Disable on clients that request their shape
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD2
-rw-r--r--openbox-3.6.2-rounded-corners.patch124
3 files changed, 79 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0cb507f27899..146d509e682e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,3 @@
-# Generated by mksrcinfo v8
-# Sun Aug 27 22:54:38 UTC 2017
pkgbase = openbox-patched
pkgdesc = Openbox with Rounded Corners patch and anything else I deem useful.
pkgver = 3.6.1
@@ -38,7 +36,7 @@ pkgbase = openbox-patched
md5sums = b72794996c6a3ad94634727b95f9d204
md5sums = 0a11d7149da210a31ef88f8a9c717711
md5sums = 5be4554431e555084026631898f167aa
- md5sums = 1bd058699b81409aa7a6dbb4f711b209
+ md5sums = 3bec0508320653ab33214b3c52bb775e
md5sums = 4c28a1482a2aeb58415cec39f7f3a694
pkgname = openbox-patched
diff --git a/PKGBUILD b/PKGBUILD
index 94114fe63b5d..782665ed211e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -36,7 +36,7 @@ source=("http://openbox.org/dist/openbox/${_pkgname}-${pkgver}.tar.gz"
md5sums=('b72794996c6a3ad94634727b95f9d204'
'0a11d7149da210a31ef88f8a9c717711'
'5be4554431e555084026631898f167aa'
- '1bd058699b81409aa7a6dbb4f711b209'
+ '3bec0508320653ab33214b3c52bb775e'
'4c28a1482a2aeb58415cec39f7f3a694')
install="${pkgname}.install"
diff --git a/openbox-3.6.2-rounded-corners.patch b/openbox-3.6.2-rounded-corners.patch
index fe0bd5360a0e..cc4f0d1b8fb1 100644
--- a/openbox-3.6.2-rounded-corners.patch
+++ b/openbox-3.6.2-rounded-corners.patch
@@ -1,27 +1,30 @@
---- a/openbox/config.h 2014-11-05 08:19:42.000000000 -0700
-+++ b/openbox/config.h 2017-03-06 14:40:38.982567786 -0700
-@@ -152,6 +152,9 @@
- extern gboolean config_animate_iconify;
- /*! Size of icons in focus switching dialogs */
- extern guint config_theme_window_list_icon_size;
-+/*! Display rounded corners for decorated windows */
-+extern guint config_theme_cornerradius;
-+extern gboolean config_theme_menuradius;
-
- /*! The font for the active window's title */
- extern RrFont *config_font_activewindow;
---- a/openbox/config.c 2014-11-05 08:19:42.000000000 -0700
-+++ b/openbox/config.c 2017-03-06 14:40:38.982567786 -0700
-@@ -48,6 +48,8 @@
+From 582568b08c354f4bb037bcfb00dd440a59d7cbe0 Mon Sep 17 00:00:00 2001
+From: cpoakes <cpoakes@users.noreply.github.com>
+Date: Tue, 29 Aug 2017 19:56:29 -0500
+Subject: [PATCH] openbox-3.6.2-rounded-corners
+
+---
+ openbox/config.c | 8 ++++++++
+ openbox/config.h | 4 ++++
+ openbox/frame.c | 30 +++++++++++++++++++++++++++++-
+ openbox/framerender.c | 7 +++++++
+ openbox/menuframe.c | 4 ++++
+ 5 files changed, 52 insertions(+), 1 deletion(-)
+
+diff --git a/openbox/config.c b/openbox/config.c
+index dad5d1bf..a387335c 100644
+--- a/openbox/config.c
++++ b/openbox/config.c
+@@ -48,6 +48,8 @@ StrutPartial config_margins;
gchar *config_theme;
gboolean config_theme_keepborder;
guint config_theme_window_list_icon_size;
-+guint config_theme_cornerradius;
++guint config_theme_cornerradius;
+gboolean config_theme_menuradius;
-
+
gchar *config_title_layout;
-
-@@ -719,6 +721,10 @@
+
+@@ -719,6 +721,10 @@ static void parse_theme(xmlNodePtr node, gpointer d)
else if (config_theme_window_list_icon_size > 96)
config_theme_window_list_icon_size = 96;
}
@@ -29,24 +32,41 @@
+ config_theme_cornerradius = obt_xml_node_int(n);
+ obt_xml_attr_bool(n, "menu", &config_theme_menuradius);
+ }
-
+
for (n = obt_xml_find_node(node, "font");
n;
-@@ -1098,6 +1104,8 @@
+@@ -1098,6 +1104,8 @@ void config_startup(ObtXmlInst *i)
config_title_layout = g_strdup("NLIMC");
config_theme_keepborder = TRUE;
config_theme_window_list_icon_size = 36;
+ config_theme_cornerradius = 0;
+ config_theme_menuradius = TRUE;
-
+
config_font_activewindow = NULL;
config_font_inactivewindow = NULL;
---- a/openbox/frame.c 2014-11-05 08:19:42.000000000 -0700
-+++ b/openbox/frame.c 2017-03-06 14:40:38.982567786 -0700
-@@ -334,6 +334,31 @@
+diff --git a/openbox/config.h b/openbox/config.h
+index 96a66cf1..5622d059 100644
+--- a/openbox/config.h
++++ b/openbox/config.h
+@@ -152,6 +152,10 @@ extern gchar *config_title_layout;
+ extern gboolean config_animate_iconify;
+ /*! Size of icons in focus switching dialogs */
+ extern guint config_theme_window_list_icon_size;
++/*! Display rounded corners for decorated windows */
++extern guint config_theme_cornerradius;
++/*! Display rounded corners for root and client-list menus */
++extern gboolean config_theme_menuradius;
+
+ /*! The font for the active window's title */
+ extern RrFont *config_font_activewindow;
+diff --git a/openbox/frame.c b/openbox/frame.c
+index 89669726..db2c7531 100644
+--- a/openbox/frame.c
++++ b/openbox/frame.c
+@@ -334,6 +334,31 @@ void frame_adjust_shape(ObFrame *self)
#endif
}
-
+
+void frame_round_corners(Window window)
+{
+ XWindowAttributes win_attr;
@@ -75,15 +95,15 @@
void frame_adjust_area(ObFrame *self, gboolean moved,
gboolean resized, gboolean fake)
{
-@@ -857,7 +882,6 @@
-
+@@ -857,7 +882,6 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
+
if (resized) {
self->need_render = TRUE;
- framerender_frame(self);
frame_adjust_shape(self);
}
-
-@@ -884,7 +908,9 @@
+
+@@ -884,7 +908,9 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
{
XResizeWindow(obt_display, self->label, self->label_width,
ob_rr_theme->label_height);
@@ -91,19 +111,21 @@
}
+ framerender_frame(self);
}
-
+
static void frame_adjust_cursors(ObFrame *self)
-@@ -958,6 +984,8 @@
+@@ -958,6 +984,8 @@ void frame_adjust_client_area(ObFrame *self)
XMoveResizeWindow(obt_display, self->backfront, 0, 0,
self->client->area.width,
self->client->area.height);
+ self->need_render = TRUE;
+ framerender_frame(self);
}
-
+
void frame_adjust_state(ObFrame *self)
---- a/openbox/framerender.c 2014-11-05 09:00:49.000000000 -0700
-+++ b/openbox/framerender.c 2017-03-06 14:40:38.986567825 -0700
+diff --git a/openbox/framerender.c b/openbox/framerender.c
+index 094d5962..54046580 100644
+--- a/openbox/framerender.c
++++ b/openbox/framerender.c
@@ -21,6 +21,7 @@
#include "openbox.h"
#include "screen.h"
@@ -111,34 +133,42 @@
+#include "config.h"
#include "framerender.h"
#include "obrender/theme.h"
-
-@@ -42,6 +43,9 @@
+
+@@ -42,6 +43,12 @@ void framerender_frame(ObFrame *self)
return;
self->need_render = FALSE;
-
-+ if ( !self->client->fullscreen && !(self->client->type == OB_CLIENT_TYPE_DOCK) && config_theme_cornerradius )
+
++ if (config_theme_cornerradius &&
++ !self->client->fullscreen &&
++ !self->client->shaped &&
++ !(self->client->type == OB_CLIENT_TYPE_DOCK))
+ frame_round_corners(self->window);
+
{
gulong px;
-
---- a/openbox/menuframe.c 2014-11-05 08:19:42.000000000 -0700
-+++ b/openbox/menuframe.c 2017-03-06 14:40:38.986567825 -0700
+
+diff --git a/openbox/menuframe.c b/openbox/menuframe.c
+index c37fdcc5..f598cf15 100644
+--- a/openbox/menuframe.c
++++ b/openbox/menuframe.c
@@ -17,6 +17,7 @@
See the COPYING file for a copy of the GNU General Public License.
*/
-
+
+#include "frame.h"
#include "menuframe.h"
#include "client.h"
#include "menu.h"
-@@ -845,6 +846,9 @@
-
+@@ -845,6 +846,9 @@ void menu_frame_render(ObMenuFrame *self)
+
RECT_SET_SIZE(self->area, w, h);
-
-+ if ( config_theme_menuradius )
+
++ if (config_theme_menuradius)
+ frame_round_corners(self->window);
+
XFlush(obt_display);
}
+
+--
+2.14.1