Bug 288721 - xreconfigurewmwindow places window on bottom of windowstack with stack_mode below
Summary: xreconfigurewmwindow places window on bottom of windowstack with stack_mode b...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-11 14:06 UTC by Martin Schreiber
Modified: 2011-12-18 18:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshots (76.76 KB, application/octet-stream)
2011-12-11 14:07 UTC, Martin Schreiber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schreiber 2011-12-11 14:06:23 UTC
Version:           unspecified (using KDE 4.7.2) 
OS:                Linux

The following code places the window on bottom of windowstack instead below sibling:
"

procedure tmainfo.exe(const sender: TObject);
var
 changes: txwindowchanges; 
begin
 changes.stack_mode:= below;
 changes.sibling:= form2fo.window.winid;
 xreconfigurewmwindow(msedisplay,form1fo.window.winid,msedefaultscreenno,
                              cwsibling or cwstackmode,@changes);

end;
"
see attachments kdebefore.png and kdeafter.png. With windowmaker it works as expected, see windowmakerbefore.png and windowmakerafter.png.
The tescase is made with MSEide+MSEgui:
http://gitorious.org/mseide-msegui
The test project is here:
http://gitorious.org/mseuniverse/mseuniverse/trees/master/testcase/window/reconfigurewmwindow



Reproducible: Always

Steps to Reproduce:
./.

Actual Results:  
./.

Expected Results:  
./.
Comment 1 Martin Schreiber 2011-12-11 14:07:55 UTC
Created attachment 66627 [details]
screenshots
Comment 2 Martin Flöser 2011-12-11 14:14:15 UTC
I think you have to explain more what you are actually doing and what you want to achieve. The pascal code is nothing I can understand any more (it's years ago since I last saw pascal code).
Comment 3 Martin Schreiber 2011-12-11 14:25:54 UTC
There are three stacked windows from top to bottom form1, form2, form3.
changes.sibling = <winid of form2>
xreconfigurewmwindow() is called with <winid of form1> as w parameter. xreconfigurewmwindow() is the xlib function XReconfigureWMWindow().
It should place form1 below form2 and above form3.
http://tronche.com/gui/x/xlib/window/configure.html#XWindowChanges
Comment 4 Thomas Lübking 2011-12-11 14:26:15 UTC
I'm not sure about the code at all ("or" is a bitwise "|" in pascal???) but i know what he wants to do.
Gonna write a simple cpp/X11 test to check whether that works.
Comment 5 Thomas Lübking 2011-12-11 14:45:24 UTC
yes, happens. No wonder, layers.cpp:690
void Client::restackWindow(Window /*above TODO */, int detail, NET::RequestSource src, Time timestamp, bool send_event)

Luckily i wrote that "poor man's window highlight" for the uncomposited mode, so fixing the todo should not be all that hard ;-)
Comment 6 Martin Schreiber 2011-12-11 14:51:22 UTC
Same problem is with the _NET_RESTACK_WINDOW protocol BTW.
Comment 7 Thomas Lübking 2011-12-18 18:52:37 UTC
Git commit b470dad7955babd73c51346831d290bed6b6ae4d by Thomas Lübking.
Committed on 11/12/2011 at 19:00.
Pushed by luebking into branch 'master'.

implement restack configure events, fix stackUnder when stacking up under a foreign client

BUG: 288721
REVIEW: 103387

M  +91   -43   kwin/layers.cpp

http://commits.kde.org/kde-workspace/b470dad7955babd73c51346831d290bed6b6ae4d