ThisWindow does not appear to apply to the titlebar of a window

Hello, I have some window maximizing keybind or tiling functions like shown below. I notice that if the mouse is on the titlebar the function or keybind does not work, but if the mouse is within the window, it does. Is there a way to also include the titlebar as part of the window or to modify the functions to include the mouse on the titlebar? The issue is if you use WindowList to choose a window, the mouse goes on the titlebar, and I cannot then use keybinds to adjust the window size/position. Example functions and bindings below:

Example function:
DestroyFunc TileRight
AddToFunc TileRight

  • I ThisWindow (!Shaded, !Iconic) Maximize True 50 100
  • I ThisWindow (Maximized, !Shaded, !Iconic) Move Screen c -0 +0
  • I ThisWindow Maximize Forget

Example keybind:
Key m W SCM Maximize toggle 100 100

Look up the context to bindings. The W context only applies to the window. You need to add other contexts to make the bindings apply to the borders or title bars. Note that ThisWindow has nothing to do with your issue. Here is an overview of how bindings work and the various contexts.

https://www.fvwm.org/Wiki/Config/Bindings/

Thank you. You are correct, the keybind should be changed to the following if I want it to also work with the mouse on the title:
Key m WT SCM Maximize toggle 100 100