Re: [dev] [st] [PATCH 3/3] Remove 'slide' variable in tresize.

2015-04-11 Thread noname
The commiter can squash 3 commits into 1 using rebase -i if he wants. I tried to separate moving loop outside if and removing local variable. I think these changes are independent.

[dev] [st] ICCCM compatible selection handling

2015-04-11 Thread Markus Wichmann
Hi all, I recently read the ICCCM regarding selection handling and noticed we are doing it wrong. Basically, we're supposed to provide real timestamps in all the calls to selection functions and check for success. Now, when requesting selection ownership, that's easy, because xsetsel() is only ca

Re: [dev] [st] [PATCH 3/3] Remove 'slide' variable in tresize.

2015-04-11 Thread Silvan Jegen
Heyhey On Sat, Apr 11, 2015 at 05:30:16PM +, noname wrote: > --- > st.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/st.c b/st.c > index 51bd40c..ce2646e 100644 This patch series does not change the logic and results in slightly fewer lines of code so I

[dev] [st] [PATCH 3/3] Remove 'slide' variable in tresize.

2015-04-11 Thread noname
--- st.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/st.c b/st.c index 51bd40c..ce2646e 100644 --- a/st.c +++ b/st.c @@ -2770,7 +2770,6 @@ tresize(int col, int row) { int i; int minrow = MIN(row, term.row); int mincol = MIN(col, term.col); -

[dev] [st] [PATCH 2/3] Move tresize comments around.

2015-04-11 Thread noname
--- st.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/st.c b/st.c index 3b45c42..51bd40c 100644 --- a/st.c +++ b/st.c @@ -2780,17 +2780,16 @@ tresize(int col, int row) { return; } - /* free unneeded rows */ + /* +* sl

[dev] [st] [PATCH 1/3] tresize: move for loop outside if

2015-04-11 Thread noname
There is no need to check that slide > 0 before executing loop. If slide <= 0, loop stops immediately. --- st.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/st.c b/st.c index b4e17e4..3b45c42 100644 --- a/st.c +++ b/st.c @@ -2781,17 +2781,16 @@ tresize(int col, int

Re: [dev] [dwm] Style changes

2015-04-11 Thread Martti Kühne
On Sat, Apr 11, 2015 at 4:10 AM, Aaron Burrow wrote: > If we're going to fix a bunch of formatting problems we should make > sure the problem doesn't resurface. Put a commit hook on the git > server that either validates formatting or does auto-formatting. > It's a really awkward thing to sugge

[dev] [st] [PATCH 1/2] Do not use switch for fork() call.

2015-04-11 Thread noname
--- st.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/st.c b/st.c index c48132a..df79e93 100644 --- a/st.c +++ b/st.c @@ -1257,11 +1257,10 @@ ttynew(void) { if(openpty(&m, &s, NULL, NULL, &w) < 0) die("openpty failed: %s\n", strerror(errno

[dev] [st] [PATCH 2/2] Simplify loop condition.

2015-04-11 Thread noname
--- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index df79e93..28beca2 100644 --- a/st.c +++ b/st.c @@ -944,7 +944,7 @@ getsel(void) { ptr = str = xmalloc(bufsize); /* append every set & selected glyph to the selection */ - for(y = s

[dev] [st] [PATCH 1/2] Use do..while in window mapping loop.

2015-04-11 Thread noname
--- st.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index b2bcfe9..83acd56 100644 --- a/st.c +++ b/st.c @@ -3917,17 +3917,15 @@ run(void) { long deltatime; /* Waiting for window mapping */ - while(1) { + do {

[dev] [st] [PATCH 2/2] Remove unnecessary XFilterEvent call.

2015-04-11 Thread noname
XFilterEvent usually filters KeyPress events according to input method. At this point the window is not mapped. The only events that we process are ConfigureNotify and MapNotify. They should not be filtered by input method. --- st.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/st.c b/st.c

[dev] [st] [PATCH 1/2] Use do..while in window mapping loop.

2015-04-11 Thread noname
--- st.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index b2bcfe9..83acd56 100644 --- a/st.c +++ b/st.c @@ -3917,17 +3917,15 @@ run(void) { long deltatime; /* Waiting for window mapping */ - while(1) { + do {