Re: [i3] [PATCH] bugfix: don't use con_is_internal

  • From: Mateusz Poszwa <old4@xxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Mon, 12 Nov 2012 12:51:29 +0100

On Mon, 12 Nov 2012 12:19:11 +0100
Simon Elsbrock <simon@xxxxxxxxx> wrote:

---
src/workspace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/workspace.c b/src/workspace.c
index 1e70718..298088e 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -343,7 +343,7 @@ static void _workspace_show(Con *workspace) {
* the corresponding workspace is cleaned up.
* NOTE: Internal cons such as __i3_scratch (when a scratchpad window is
* focused) are skipped, see bug #868. */
- if (current && !con_is_internal(current)) {
+ if (current && current->name[0] == '_' && current->name[1] == '_') {

Shouldn't that be…:

+ if (current && !(current->name[0] == '_' && current->name[1] == '_')) {

…? I'm not familiar with !con_is_internal, but the comment above
says that internal cons do begin with two underscores.

FREE(previous_workspace_name);
if (current) {
previous_workspace_name = sstrdup(current->name);



--
Mateusz Poszwa

Other related posts: