Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send_WindowList reports zero title_height and border_width fields #1116

Closed
pisajew opened this issue Nov 22, 2024 · 6 comments
Closed

Send_WindowList reports zero title_height and border_width fields #1116

pisajew opened this issue Nov 22, 2024 · 6 comments
Labels
skip:changelog Issue/PR should skip CHANGELOG type:bug Something's broken!

Comments

@pisajew
Copy link

pisajew commented Nov 22, 2024

Upfront Information

I've been using fvwm2 for ages now and I am using a custom module I written for it years ago. The module, when invoked in context of specific window, resizes and moves this window to fill the biggest chunk of unoccupied space. To do its work, the module sets message mask to M_CONFIGURE_WINDOW, sends Send_WindowList command and uses information prowided by M_CONFIGURE_WINDOW packets to do its calculations.

A month ago I was eventually forced to upgrade to fvwm3 (after recent OS update fvwm2.7.0 started crashing randomly). My config file and the module code are unchanged, but I noticed that my module misplaces windows now. One reason I found is that on fvwm3, when M_CONFIGURE_WINDOW is received, title_height and border_width fields of ConfigWinPacket are always set to zero (even though the actual windows have visible borders and title bars).

  • Fvwm3 version (run: fvwm3 --version)
    fvwm3 1.1.0 (released)
    with support for: ReadLine, XPM, PNG, SVG, Shape, XShm, SM, XRandR, XRender, XCursor, XFT, NLS

fvwm3 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of fvwm under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

  • Linux distribution or BSD name/version
    OpenBSD 7.6
  • Platform (run: uname -sp)
    OpenBSD amd64

Expected Behaviour

M_CONFIGURE_WINDOW packet should report correct values for border width and title height.

Actual Behaviour

M_CONFIGURE_WINDOW packet always reports zero border width and title height.

@pisajew pisajew added the type:bug Something's broken! label Nov 22, 2024
@somiaj
Copy link
Collaborator

somiaj commented Nov 22, 2024

M_CONFIGURE_WINDOW has been modified, are you sure you just haven't updated your module to the new fields that come though it? I am fairly sure when I updated FvwmRearrange I was correctly getting the title height and border with from there.

@somiaj
Copy link
Collaborator

somiaj commented Nov 22, 2024

Yea, I just tested, I am getting the title height and border with just fine with the M_CONFIGURE_WINDOW packets.

Title height: 20
Border Width: 5
Title height: 20
Border Width: 5
Title height: 20
Border Width: 5
Title height: 20
Border Width: 5
Title height: 20
Border Width: 5

I think your module just needs to be updated to parse the packet correctly or use the helper libraries in libs/ to keep in sync with the changes.

@somiaj
Copy link
Collaborator

somiaj commented Nov 22, 2024

Note, 2.7.0 is probably crashing due to some xthreads changes. This patch should get 2.7.0 back up and running for you (though I suggest you just update and move to fvwm3, it is where any active development and support will be).

fvwmorg/fvwm#102

@pisajew
Copy link
Author

pisajew commented Nov 22, 2024

M_CONFIGURE_WINDOW has been modified, are you sure you just haven't updated your module to the new fields that come though it? I am fairly sure when I updated FvwmRearrange I was correctly getting the title height and border with from there.

I've rebuilt it with the fvwm3 headers. It seems thatI'm still having the problem, but that's only a quick check. Will re-check thoroughly in a day or 2 and report back.

@pisajew
Copy link
Author

pisajew commented Nov 22, 2024

After rebuilding the code with fvwm3 headers I see more strange behaviours (i.e. iconified windows are reported as not iconified) but as somiaj reports it works for him I assume that it's my problem rather than an fvwm bug. Perhaps it is my config to blame (I have some concepts there that date back to fvwm 1 times). So for now I close this report.

@pisajew pisajew closed this as completed Nov 22, 2024
@somiaj
Copy link
Collaborator

somiaj commented Nov 22, 2024

You might want to look into using FvwmMFL and just send data to and from your module using JSON and not have to worry about translating the packets.

@ThomasAdam ThomasAdam added the skip:changelog Issue/PR should skip CHANGELOG label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip:changelog Issue/PR should skip CHANGELOG type:bug Something's broken!
Projects
None yet
Development

No branches or pull requests

3 participants