fvwmorg / fvwm3

FVWM version 3 -- the successor to fvwm2
Other
517 stars 78 forks source link

Send_WindowList reports zero title_height and border_width fields #1116

Open pisajew opened 10 hours ago

pisajew commented 10 hours ago

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 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.

Actual Behaviour

M_CONFIGURE_WINDOW packet always reports zero border width and title height.

somiaj commented 10 hours ago

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 commented 10 hours ago

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 commented 10 hours ago

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).

https://github.com/fvwmorg/fvwm/pull/102

pisajew commented 9 hours ago

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.