[EGIT] [e16] 01/03: edge: Cosmetics
This is an automated email from the git hooks/post-receive script. git pushed a commit to branch master in repository e16. View the commit online. commit ee3355669c764a7c27559c5bafb876f6a60fc539 Author: Kim Woelders AuthorDate: Mon Jul 18 13:04:39 2022 +0200 edge: Cosmetics --- src/edge.c | 40 +++- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/edge.c b/src/edge.c index eadf65c6..add60c40 100644 --- a/src/edge.c +++ b/src/edge.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2015 Kim Woelders + * Copyright (C) 2004-2021 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -33,6 +33,11 @@ #include "timers.h" #include "xwin.h" +#define EW_L 0 /* Left */ +#define EW_R 1 /* Right */ +#define EW_T 2 /* Top*/ +#define EW_B 3 /* Bottom */ + static EObj*w1 = NULL, *w2 = NULL, *w3 = NULL, *w4 = NULL; static Timer *edge_timer = NULL; @@ -66,25 +71,25 @@ EdgeTimeout(void *data) day = 0; switch (val) { - case 0: + case EW_L: if (ax == 0 && !Conf.desks.areas_wraparound) goto done; dx = WinGetW(VROOT) - 2; dax = -1; break; - case 1: + case EW_R: if (ax == (aw - 1) && !Conf.desks.areas_wraparound) goto done; dx = -(WinGetW(VROOT) - 2); dax = 1; break; - case 2: + case EW_T: if (ay == 0 && !Conf.desks.areas_wraparound) goto done; dy = WinGetH(VROOT) - 2; day = -1; break; - case 3: + case EW_B: if (ay == (ah - 1) && !Conf.desks.areas_wraparound) goto done; dy = -(WinGetH(VROOT) - 2); @@ -173,6 +178,7 @@ EdgeCheckMotion(int x, int y) dir = 3; else dir = -1; + EdgeEvent(dir); } @@ -188,20 +194,20 @@ EdgeWindowShow(int which, int on) switch (which) { default: - case 1: /* Left */ + case EW_L: /* Left */ eo = w1; h = WinGetH(VROOT); break; - case 2: /* Right */ + case EW_R: /* Right */ eo = w2; x = WinGetW(VROOT) - 1; h = WinGetH(VROOT); break; - case 3: /* Top */ + case EW_T: /* Top */ eo = w3; w = WinGetW(VROOT); break; - case 4: /* Bottom */ + case EW_B: /* Bottom */ eo = w4; y = WinGetH(VROOT) - 1; w = WinGetW(VROOT); @@ -246,18 +252,18 @@ EdgeWindowsShow(void) ESelectInput(EobjGetWin(w2), EnterWindowMask | LeaveWindowMask); ESelectInput(EobjGetWin(w3), EnterWindowMask | LeaveWindowMask); ESelectInput(EobjGetWin(w4), EnterWindowMask | LeaveWindowMask); - EventCallbackRegister(EobjGetWin(w1), EdgeHandleEvents, (void *)0); - EventCallbackRegister(EobjGetWin(w2), EdgeHandleEvents, (void *)1); - EventCallbackRegister(EobjGetWin(w3), EdgeHandleEvents, (void *)2); - EventCallbackRegister(EobjGetWin(w4), EdgeHandleEvents, (void *)3); + EventCallbackRegister(EobjGetWin(w1), EdgeHandleEvents, (void *)EW_L); + EventCallbackRegister(EobjGetWin(w2), EdgeHandleEvents, (void *)EW_R); + EventCallbackRegister(EobjGetWin(w3), EdgeHandleEvents, (void *)EW_T); + EventCallbackRegister(EobjGetWin(w4), EdgeHandleEvents, (void *)EW_B); } DeskCurrentGetArea(&cx, &cy); DesksGetAreaSize(&ax, &ay); - EdgeWindowShow(1, cx != 0 || Conf.desks.areas_wraparound); - EdgeWindowShow(2, cx != (ax - 1) || Conf.desks.areas_wraparound); - EdgeWindowShow(3, cy != 0 || Conf.desks.areas_wraparound); - EdgeWindowShow(4, cy != (ay - 1) || Conf.desks.areas_wraparound); + EdgeWindowShow(EW_L, cx != 0 || Conf.desks.areas_wraparound); + EdgeWindowShow(EW_R, cx != (ax - 1) || Conf.desks.areas_wraparound); + EdgeWindowShow(EW_T, cy != 0 || Conf.desks.areas_wraparound); + EdgeWindowShow(EW_B, cy != (ay - 1) || Conf.desks.areas_wraparound); } void -- To stop receiving notification emails like this one, please contact the administrator of this repository.
[EGIT] [e16] 03/03: edge: Prevent pointer click and motion events propagating to root
This is an automated email from the git hooks/post-receive script. git pushed a commit to branch master in repository e16. View the commit online. commit dee8d4f36925f66f63925726b542289b18bef273 Author: Kim Woelders AuthorDate: Fri Jul 22 06:33:52 2022 +0200 edge: Prevent pointer click and motion events propagating to root Avoids activating desk flips, root menus, and root window tooltips when clicking on or moving over the edge windows. --- src/edge.c | 4 1 file changed, 4 insertions(+) diff --git a/src/edge.c b/src/edge.c index a9002e77..23f9a114 100644 --- a/src/edge.c +++ b/src/edge.c @@ -187,10 +187,14 @@ EdgeWindowCreate(int which, int x, int y, int w, int h) { static const char *const names[] = { "Edge-L", "Edge-R", "Edge-T", "Edge-B" }; + XSetWindowAttributes att; EObj *eo; eo = EobjWindowCreate(EOBJ_TYPE_EVENT, x, y, w, h, 0, names[which & 3]); ESelectInput(EobjGetWin(eo), EnterWindowMask | LeaveWindowMask); + att.do_not_propagate_mask = + ButtonPressMask | ButtonReleaseMask | PointerMotionMask; + EChangeWindowAttributes(EobjGetWin(eo), CWDontPropagate, &att); EventCallbackRegister(EobjGetWin(eo), EdgeHandleEvents, INT2PTR(which)); return eo; -- To stop receiving notification emails like this one, please contact the administrator of this repository.
[EGIT] [e16] 02/03: edge: Refactor window creation
This is an automated email from the git hooks/post-receive script. git pushed a commit to branch master in repository e16. View the commit online. commit 032e0b38966e9cfc8c3b666781781b9cde31df59 Author: Kim Woelders AuthorDate: Mon Jul 18 13:29:39 2022 +0200 edge: Refactor window creation --- src/edge.c | 53 +++-- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/edge.c b/src/edge.c index add60c40..a9002e77 100644 --- a/src/edge.c +++ b/src/edge.c @@ -182,10 +182,24 @@ EdgeCheckMotion(int x, int y) EdgeEvent(dir); } +static EObj* +EdgeWindowCreate(int which, int x, int y, int w, int h) +{ + static const char *const names[] = + { "Edge-L", "Edge-R", "Edge-T", "Edge-B" }; + EObj *eo; + + eo = EobjWindowCreate(EOBJ_TYPE_EVENT, x, y, w, h, 0, names[which & 3]); + ESelectInput(EobjGetWin(eo), EnterWindowMask | LeaveWindowMask); + EventCallbackRegister(EobjGetWin(eo), EdgeHandleEvents, INT2PTR(which)); + + return eo; +} + static void EdgeWindowShow(int which, int on) { - EObj *eo; + EObj *eo, **peo; int x, y, w, h; x = y = 0; @@ -195,25 +209,33 @@ EdgeWindowShow(int which, int on) { default: case EW_L: /* Left */ - eo = w1; + peo = &w1; h = WinGetH(VROOT); break; case EW_R: /* Right */ - eo = w2; + peo = &w2; x = WinGetW(VROOT) - 1; h = WinGetH(VROOT); break; case EW_T: /* Top */ - eo = w3; + peo = &w3; w = WinGetW(VROOT); break; case EW_B: /* Bottom */ - eo = w4; + peo = &w4; y = WinGetH(VROOT) - 1; w = WinGetW(VROOT); break; } + eo = *peo; + if (!eo) + { + eo = *peo = EdgeWindowCreate(which, x, y, w, h); + if (!eo) + return; + } + if (on) { EobjMoveResize(eo, x, y, w, h); @@ -236,27 +258,6 @@ EdgeWindowsShow(void) return; } - if (!w1) - { - w1 = EobjWindowCreate(EOBJ_TYPE_EVENT, - 0, 0, 1, WinGetH(VROOT), 0, "Edge-L"); - w2 = EobjWindowCreate(EOBJ_TYPE_EVENT, - WinGetW(VROOT) - 1, 0, 1, WinGetH(VROOT), - 0, "Edge-R"); - w3 = EobjWindowCreate(EOBJ_TYPE_EVENT, - 0, 0, WinGetW(VROOT), 1, 0, "Edge-T"); - w4 = EobjWindowCreate(EOBJ_TYPE_EVENT, - 0, WinGetH(VROOT) - 1, WinGetW(VROOT), 1, - 0, "Edge-B"); - ESelectInput(EobjGetWin(w1), EnterWindowMask | LeaveWindowMask); - ESelectInput(EobjGetWin(w2), EnterWindowMask | LeaveWindowMask); - ESelectInput(EobjGetWin(w3), EnterWindowMask | LeaveWindowMask); - ESelectInput(EobjGetWin(w4), EnterWindowMask | LeaveWindowMask); - EventCallbackRegister(EobjGetWin(w1), EdgeHandleEvents, (void *)EW_L); - EventCallbackRegister(EobjGetWin(w2), EdgeHandleEvents, (void *)EW_R); - EventCallbackRegister(EobjGetWin(w3), EdgeHandleEvents, (void *)EW_T); - EventCallbackRegister(EobjGetWin(w4), EdgeHandleEvents, (void *)EW_B); - } DeskCurrentGetArea(&cx, &cy); DesksGetAreaSize(&ax, &ay); -- To stop receiving notification emails like this one, please contact the administrator of this repository.
[EGIT] [e16] 01/01: autofoo: Drop pkg_revision some more
This is an automated email from the git hooks/post-receive script. git pushed a commit to branch master in repository e16. View the commit online. commit 845cbedaf7661bd2059a37bf6379f828061cb1f8 Author: Kim Woelders AuthorDate: Sat Jul 23 14:24:51 2022 +0200 autofoo: Drop pkg_revision some more --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index db594a46..a504baaa 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_MACRO_DIR([m4]) -AM_CONDITIONAL(SRC_IS_GIT, m4_ifdef([pkg_revision], [test -d $srcdir/.git], [false])) +AM_CONDITIONAL(SRC_IS_GIT, test -d $srcdir/.git) AC_USE_SYSTEM_EXTENSIONS -- To stop receiving notification emails like this one, please contact the administrator of this repository.