[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [kwin] [Bug 335367] kwin gets stacking order and focus wrong for simple gtk+-2.0 testcase program
From:       Thomas Lübking <thomas.luebking () gmail ! com>
Date:       2014-05-26 15:58:46
Message-ID: bug-335367-17878-ilRByEMDFP () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=335367

Thomas Lübking <thomas.luebking@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|general                     |core
         Resolution|---                         |INVALID

--- Comment #3 from Thomas Lübking <thomas.luebking@gmail.com> ---
On https://git.reviewboard.kde.org/r/110919/, you will get the window raised in
any case but never receive the input focus.

Setting the focus stealing prevention to "None" makes your test case as you'd
expect it.

Aside playing around w/ the usertime, you can also feign being a tool
(pager/taskbar) to forcefully set the active window (this should only be done
in response to direct user input, any relevant client abusing this will find
itself in a blacklist quickly ;-)

Please notice that there's no behavioral guarantee on mapping a window -
neither will it implicitly receive the focus (you'd have to explicitly request
that, and even then cannot expect the request to be honored - unless you feign
a tool), nor being raised.

The WM does not even have to respect the plain map request (eg. if it's on
another virtual desktop etc.)

-> for your usecase, feign tool activation (unfortunately i've no idea whether
there's a gtk+ function for that - the "tool" is a value in the client message:

--------

XEvent e;
e.xclient.type = ClientMessage;
e.xclient.message_type = net_active_window;  // "_NET_ACTIVE_WINDOW"
e.xclient.display = p->display;
e.xclient.window = window; // wid to activate
e.xclient.format = 32;
e.xclient.data.l[0] = src; // NET::FromTool = 2
e.xclient.data.l[1] = timestamp;
e.xclient.data.l[2] = active_window; // use 0
e.xclient.data.l[3] = 0l;
e.xclient.data.l[4] = 0l;

XSendEvent(p->display, p->root, False, netwm_sendevent_mask, &e);

-- 
You are receiving this mail because:
You are watching all bug changes.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic