|
From: | Alessandro Sangiuliano |
Subject: | I: A window manager written in objective-c: uroswm and gnustep support problems |
Date: | Mon, 14 Sep 2020 17:37:06 +0000 |
Hello guys, I'm still here with this problem. It is going to be tricky.
This time I have more informations;
I started to use the github projects and columns feature so I can clean ideas in my mind and put all toghether.
At this column called GNUstep support
https://github.com/AlessandroSangiuliano/XcbKit/projects/2#column-10827552
i wrote in a better way the problem, but with some additional informations about is going to happen after a debbugging session.
I noticed that the map just works, the client window of a GNUStep is mapped where I want to be apped inside the frame window at coordinates (0, 21).
The problem happens after the map request event, in the configure window request event. In the coulmn is well described.
Do you think that resetting the W;_NORMAL_HINTS of the client window will fix the problem?
I don't see how to fix the offset calculation that GNUStep does.
I tried to run GNUStep Apps with window managers that are going to be really poor in ICCCM and EWMH support; I tried with twm and echinus ( a dwm fork); With these GNUstep Apps are positioned inside the frame in the correct way (echinus is a reparenting wm).
The source code of echinus is really few lines of code, I give it a flash lookm it doesn't seem that play so much with offset or whethever. I'm just failing something.
GNUStep Apps are working quite well also with awesome wm, I wm that i studied to get some knowledge about xcb. The have totally no support for _NET_REQUEST_FRAME_EXTENTS, while they update the _NET_FRAME_EXTENTS to the window.
I do that too, putting the array as {3,3,21,3}. These values actually are my borders + the title bar window (21 in height).
I also tried to use xprop on SystemPreferences running on my desktopn environment, XFCE on Manjaro, the _NET_FRAME_EXTENTS are set to {2,2,28,2}. 28 is the height of the title bar window, indeed is slighty heghter than mine.
Thank you.
Cheers,
Alex. Da: alex22_7@hotmail.com <alex22_7@hotmail.com>
Inviato: venerdì 4 settembre 2020 12:04 A: Fred Kiefer <fredkiefer@gmx.de> Cc: discuss-gnustep@gnu.org <discuss-gnustep@gnu.org> Oggetto: Re: A window manager written in objective-c: uroswm and gnustep support problems Hello,
I couldn't send the email for the values in the previous days, I was away for a little vacation.
These are the values and control flow:
At the time of the ap request uroswm maps to (0,21) the client window in the frame, where 21 is the actual size of the title bar.
uroswm output:
Client window decorated with id 4194378
2020-09-04 12:08:48.584 uroswm[4358:4358] Window id: 4194378. Parent window id: 2097169.
Window Position: (x: 0, y: 21), Size: (width: 592, height: 414)
2020-09-04 12:08:48.584 uroswm[4358:4358] Window id: 2097169. Parent window id: 970.
Window Position: (x: 200, y: 286), Size: (width: 593, height: 436)
The window with id 2097169 is the frame window.
SystemPrederences output:
2020-09-04 12:08:48.542 SystemPreferences[4359:4359] Ignore left offset change from 0 to 3
2020-09-04 12:08:48.543 SystemPreferences[4359:4359] Ignore right offset change from 0 to 4
2020-09-04 12:08:48.543 SystemPreferences[4359:4359] Ignore top offset change from 0 to 24
2020-09-04 12:08:48.543 SystemPreferences[4359:4359] Ignore bottom offset change from 0 to 3
2020-09-04 12:08:48.543 SystemPreferences[4359:4359] Reparent was with offset 0 21
2020-09-04 12:08:48.543 SystemPreferences[4359:4359] Parent border,width,height 3,65,85
2020-09-04 12:08:48.597 SystemPreferences[4359:4359] Ignore right offset change from 3 to 4
2020-09-04 12:08:48.597 SystemPreferences[4359:4359] Ignore top offset change from 3 to 24
2020-09-04 12:08:48.597 SystemPreferences[4359:4359] Ignore bottom offset change from 3 to 4
2020-09-04 12:08:48.597 SystemPreferences[4359:4359] Reparent was with offset 0 21
2020-09-04 12:08:48.597 SystemPreferences[4359:4359] Parent border,width,height 3,593,436
Despute the ignore logs I'd like to solve (but actually I don't know the -back code about that), SystemPreferences is printing a (0,21) reparenting offset that is correct.
All this is happening in the handleMapRequest uroswm's method/message. The border that is 3 is correct too.
So the uroswm maps it and then receive a configureNotify and here I noticed this:
2020-09-04 12:08:48.586 uroswm[4358:4358] Configure notify for window 4194378
2020-09-04 12:08:48.586 uroswm[4358:4358] In configure notify for window 4194378: 200, 302
So logging the event it says that the client window 4194378 that is already reparented to the frame 2097169 is configuring to (200,302). We can call this Delta! It is just the frame window offset, plus some pixel for the y coordinate, relative to the
root window (x,y) (root window id:907)
So I can say this:
the frame window is mapped relative to the root window at position (200,286);
the client window is mapped relative to the frame window at the same position, plus some pixels (probably coming from the titlebar calculations) , so -back is reconfiguring the client window inside the frame at the same distance of the frame to the root
window.
So we know that the top left corner of the root window is (0,0) and the frame is mapping to (200,286). The client window takes somewhere those values, does some calculation, and reconfigure the position in the frame to the same distance that the frame
has to the root window's top left corner, while it should just be (0,21) like it is after the mapRequest event. So for what I saw it is the configure notify event that is going wrong.
I can suppose that after the map request, and the mapping, -back is trying to calculate the offset, but I don't know how. In -back code i can see it is getting the extents in the right way and that are correct, but before that there is a generi ofset calculation
that I don't know where -back is doing it.
Message -checkStyle line 806:
Ideally after the map request, receiving the configureNotify, I'd like to have (0,21) from the event->x and event->y
Code from XCBKit still not pushed. In map request this is the snippet that prints the values of the positions and so on both for frame and window, here is where the client i mapped inside the frame at (0,21):
Snippet in the configureNotify event where I get the (200, 302) for the client window in the frame window after mapped.
At that time we try to determine how big the window borders are going to be and these values will be used later on to compute the internal offset for all GNUstep windows. Hope this helps, Fred
Cheers,
Alex
|
[Prev in Thread] | Current Thread | [Next in Thread] |