Discussion:
FVWM: Need advice for debug technique to debug window event and Fvwm behaviour.
Oleksandr Gavenko
2012-09-29 21:36:53 UTC
Permalink
I want to debug strange behaviour (if any interesting look below).

I spend large time in reading and searching over Internet, but does not found
tools, that help me. Most useful utils is:

$ xev -id $ID

But my problem occur when window created so xev doesn't help me.

I also try use xmon from:

http://ftp.x.org/contrib/devel_tools/

but can't make it work...

I have experience with Microsoft tool Spy++. Is something similar exist for X
Window (on StackOwerflow I found negative answers...)?

I have several window with same class and want to record all event that they
receive, some of them can be created in any time...

================================================================

With ~/.fvwm/config with only:

DestroyFunc MyFuncFocusWindow
AddToFunc MyFuncFocusWindow
+ I FlipFocus
# + I WarpToWindow 50 50
DestroyModuleConfig FvwmEvent-NewWindow
*FvwmEvent-NewWindow: Cmd
*FvwmEvent-NewWindow: add_window MyFuncFocusWindow

AddToFunc StartFunction I Module FvwmEvent
AddToFunc StartFunction I FvwmEvent FvwmEvent-NewWindow

I have non expected behaviour in Emacs. Lets explain: with "M-x ediff-buffer"
command in Emacs Emacs spawn new window. By default it places on top right
corner of current page/desk.

But with MyFuncFocusWindow ediff window appear one page below and one page
right.

By design ediff window is helper window and must be showed on same page as
main Emacs window.

Such behaviour reproduced with Focus, FlipFocus, and WarpToWindow command.

If I restart Fvwm without killing fvwm (through default menu) strange
behaviour disappear.

I think that ediff window appear with some offset from main Emacs window, and
then move itself to proper place. FvwmEvent injected in the middle of this
process and break it.

================================================================

I use FvwmEvent only for "WarpToWindow 50 50"...
--
Best regards!
Oleksandr Gavenko
2012-09-30 22:35:37 UTC
Permalink
Post by Oleksandr Gavenko
I want to debug strange behaviour (if any interesting look below).
[SKIP]
DestroyFunc MyFuncFocusWindow
AddToFunc MyFuncFocusWindow
+ I FlipFocus
# + I WarpToWindow 50 50
DestroyModuleConfig FvwmEvent-NewWindow
*FvwmEvent-NewWindow: Cmd
*FvwmEvent-NewWindow: add_window MyFuncFocusWindow
AddToFunc StartFunction I Module FvwmEvent
AddToFunc StartFunction I FvwmEvent FvwmEvent-NewWindow
I have non expected behaviour in Emacs. Lets explain: with "M-x ediff-buffer"
command in Emacs Emacs spawn new window. By default it places on top right
corner of current page/desk.
But with MyFuncFocusWindow ediff window appear one page below and one page
right.
By design ediff window is helper window and must be showed on same page as
main Emacs window.
Such behaviour reproduced with Focus, FlipFocus, and WarpToWindow command.
If I restart Fvwm without killing fvwm (through default menu) strange
behaviour disappear.
I think that ediff window appear with some offset from main Emacs window, and
then move itself to proper place. FvwmEvent injected in the middle of this
process and break it.
I slowly move on debugging my issue.

Recently I found such settings:

Module FvwmDebug
BugOpts DisplayNewWindowNames on
BugOpts ExplainWindowPlacement on

which show that original ediff window opened with large offset out of my
display resolution (I skip a lot of event so may be delete some essential
info):

[fvwm][__explain_placement]: placed new window 0x1c02442 'Ediff':
initial size 138x58
desk 2 (current desk)
current page
screen: current screen: 0 0 1280x1024 (current screen)
position 1281 1025 (used user specified position)
M_ADD_WINDOW
win_id 0x1c02442
frame_id 0x0c00a01
ptr 140736654276488
frame_x 1281
frame_y 1025
frame_width 138
frame_height 58
desk 2
layer 4
win_width 0
win_height 0
resize_width_inc 7
resize_height_inc 14
minimum_width 7
minimum_height 14
maximum_width 14
maximum_height 14
icon_title_id 0x0007fff
icon_image_id 0x0007fff
gravity 0
fore_color rgb:00/00/00
back_color rgb:00/00/01
ewmh_layer 13882323
ewmh_desktop 6908265
ewmh_window_type 0
M_WINDOW_NAME
win_id 0x1c02442
frame_id 0x0c00a01
ptr 16023696
name "Ediff"
M_RESTACK
win_id 0x140000b
frame_id 0x0c00416
ptr 16005920
low_windows (2)
[1] win_id 0x1c02442
[1] frame_id 0x0c00a01
[1] ptr 16023696
[2] win_id 0x1c00018
[2] frame_id 0x0c003f8
[2] ptr 15997632
M_RES_CLASS
win_id 0x1c02442
frame_id 0x0c00a01
ptr 16023696
name "Emacs"
M_RAISE_WINDOW
win_id 0x1c02442
frame_id 0x0c00a01
ptr 16023696
M_MAP
win_id 0x1c02442
frame_id 0x0c00a01
ptr 16023696
M_NEW_PAGE
vp_x 1280
vp_y 1024
desk_n 2
vp_width 1280
vp_height 1024
desk_pages_x 3
desk_pages_y 3
M_RAISE_WINDOW
win_id 0x1c02442
frame_id 0x0c00a01
ptr 16023696

I don't understand M_NEW_PAGE event.
--
Best regards!
Dan Espen
2012-09-30 23:51:43 UTC
Permalink
Post by Oleksandr Gavenko
Post by Oleksandr Gavenko
I want to debug strange behaviour (if any interesting look below).
[SKIP]
DestroyFunc MyFuncFocusWindow
AddToFunc MyFuncFocusWindow
+ I FlipFocus
# + I WarpToWindow 50 50
DestroyModuleConfig FvwmEvent-NewWindow
*FvwmEvent-NewWindow: Cmd
*FvwmEvent-NewWindow: add_window MyFuncFocusWindow
AddToFunc StartFunction I Module FvwmEvent
AddToFunc StartFunction I FvwmEvent FvwmEvent-NewWindow
I have non expected behaviour in Emacs. Lets explain: with "M-x ediff-buffer"
command in Emacs Emacs spawn new window. By default it places on top right
corner of current page/desk.
But with MyFuncFocusWindow ediff window appear one page below and one page
right.
By design ediff window is helper window and must be showed on same page as
main Emacs window.
Such behaviour reproduced with Focus, FlipFocus, and WarpToWindow command.
If I restart Fvwm without killing fvwm (through default menu) strange
behaviour disappear.
I think that ediff window appear with some offset from main Emacs window, and
then move itself to proper place. FvwmEvent injected in the middle of this
process and break it.
I slowly move on debugging my issue.
Module FvwmDebug
BugOpts DisplayNewWindowNames on
BugOpts ExplainWindowPlacement on
M_NEW_PAGE
vp_x 1280
vp_y 1024
desk_n 2
vp_width 1280
vp_height 1024
desk_pages_x 3
desk_pages_y 3
I don't understand M_NEW_PAGE event.
The module interface is documented here (M_NEW_PAGE) entry:

http://fvwm.org/documentation/dev_modules.php#M_NEW_PAGE

Looks like the last 2 fields are new and need to be documented.
--
Dan Espen
Loading...