[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] A bug of _NET_ACTIVE_WINDOW with StumpWM.

From: Shawn
Subject: Re: [STUMP] A bug of _NET_ACTIVE_WINDOW with StumpWM.
Date: Thu, 30 Oct 2008 12:30:28 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Andy Stewart <address@hidden> writes:

> Hi, I have found a bug of _NET_ACTIVE_WINDOW with StumpWM.
> I have a extension that use scim-bridge with emacs for input CJK characters.
> And in my elisp code have use below command:
> "xprop -root _NET_ACTIVE_WINDOW"
> for display language bar and candidate window with SCIM.
> But I found when I typing C-t, foreground window loses the input focus,
> and the _NET_ACTIVE_WINDOW property is not changed.
> As a result of this, language bar and candidate window might not be
> correctly displayed.
> So I think this is bug of StumpWM that not changed _NET_ACTIVE_WINDOW
> property when window lose focus.

I don't think it would be correct to update this property when stumpwm
reads and executes a command.

Your extension should probably use a different helper program that
returns the currently focused window rather than rely on window
properties. A C program that does this would look like:

/* gcc focus.c -o focus -lX11 */
#include <X11/X.h>
#include <X11/Xlib.h>
#include <stdio.h>

main ()
  Display *dpy;
  Window focus;
  int revert;

  if (!(dpy = XOpenDisplay (NULL)))
      fprintf (stderr, "Can't open display\n");
      return 1;

  XGetInputFocus (dpy, &focus, &revert);
  printf ("%ld\n", focus);
  XCloseDisplay (dpy);
  return 0;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]