mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-08-06 07:02:01 -07:00
sowm: rounded corners patch, rebase
This commit is contained in:
@@ -15,14 +15,14 @@ index 864c9a7..1525894 100644
|
|||||||
+++ b/config.h
|
+++ b/config.h
|
||||||
@@ -2,6 +2,7 @@
|
@@ -2,6 +2,7 @@
|
||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
#define MOD Mod4Mask
|
#define MOD Mod4Mask
|
||||||
+#define ROUND_CORNERS 20
|
+#define ROUND_CORNERS 20
|
||||||
|
|
||||||
const char* menu[] = {"dmenu_run", 0};
|
const char* menu[] = {"dmenu_run", 0};
|
||||||
const char* term[] = {"st", 0};
|
const char* term[] = {"st", 0};
|
||||||
diff --git a/sowm.c b/sowm.c
|
diff --git a/sowm.c b/sowm.c
|
||||||
index 1618a65..29794cb 100644
|
index b927fda..2775eb7 100644
|
||||||
--- a/sowm.c
|
--- a/sowm.c
|
||||||
+++ b/sowm.c
|
+++ b/sowm.c
|
||||||
@@ -5,6 +5,7 @@
|
@@ -5,6 +5,7 @@
|
||||||
@@ -41,26 +41,26 @@ index 1618a65..29794cb 100644
|
|||||||
static void win_to_ws(const Arg arg);
|
static void win_to_ws(const Arg arg);
|
||||||
static void ws_go(const Arg arg);
|
static void ws_go(const Arg arg);
|
||||||
static void ws_save(int i);
|
static void ws_save(int i);
|
||||||
@@ -87,6 +89,8 @@ void notify_destroy(XEvent *e) {
|
@@ -93,6 +95,8 @@ void notify_destroy(XEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void notify_enter(XEvent *e) {
|
void notify_enter(XEvent *e) {
|
||||||
+ while(XCheckTypedEvent(d, EnterNotify, e));
|
+ while(XCheckTypedEvent(d, EnterNotify, e));
|
||||||
+
|
+
|
||||||
if (e->xcrossing.window != root) FOC(e->xcrossing.window)
|
if (e->xcrossing.window != root) FOC(e->xcrossing.window)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,6 +108,8 @@ void notify_motion(XEvent *e) {
|
@@ -110,6 +114,8 @@ void notify_motion(XEvent *e) {
|
||||||
attr.y + (mouse.button==1 ? yd : 0),
|
attr.y + (mouse.button==1 ? yd : 0),
|
||||||
attr.width + (mouse.button==3 ? xd : 0),
|
attr.width + (mouse.button==3 ? xd : 0),
|
||||||
attr.height + (mouse.button==3 ? yd : 0));
|
attr.height + (mouse.button==3 ? yd : 0));
|
||||||
+
|
+
|
||||||
+ win_round_corners(mouse.subwindow, ROUND_CORNERS);
|
+ win_round_corners(mouse.subwindow, ROUND_CORNERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
for WIN if (c->w == mouse.subwindow) c->f = 0;
|
for WIN if (c->w == mouse.subwindow) c->f = 0;
|
||||||
@@ -219,7 +225,45 @@ void win_fs(Window w) {
|
@@ -220,7 +226,45 @@ void win_fs(Window w) {
|
||||||
|
|
||||||
} else
|
} else
|
||||||
XMoveResizeWindow(d, w, c->a.x, c->a.y, c->a.width, c->a.height);
|
XMoveResizeWindow(d, w, c->a.x, c->a.y, c->a.width, c->a.height);
|
||||||
+
|
+
|
||||||
@@ -103,10 +103,10 @@ index 1618a65..29794cb 100644
|
|||||||
+ XFreePixmap(d, mask);
|
+ XFreePixmap(d, mask);
|
||||||
+ XFreeGC(d, shape_gc);
|
+ XFreeGC(d, shape_gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void win_to_ws(const Arg arg) {
|
void win_to_ws(const Arg arg) {
|
||||||
@@ -313,6 +357,7 @@ void map_request(XEvent *e) {
|
@@ -313,6 +357,7 @@ void map_request(XEvent *e) {
|
||||||
EnterWindowMask|FocusChangeMask);
|
EnterWindowMask|FocusChangeMask);
|
||||||
win_center(w);
|
win_center(w);
|
||||||
XMapWindow(d, w);
|
XMapWindow(d, w);
|
||||||
+ win_round_corners(w, ROUND_CORNERS);
|
+ win_round_corners(w, ROUND_CORNERS);
|
||||||
|
Reference in New Issue
Block a user