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

FvwmPager segfaults on fvwm3 ta/gh-22 #44

Closed
NsCDE opened this issue Apr 13, 2020 · 8 comments · Fixed by #75
Closed

FvwmPager segfaults on fvwm3 ta/gh-22 #44

NsCDE opened this issue Apr 13, 2020 · 8 comments · Fixed by #75
Assignees
Labels
type:bug Something's broken!
Milestone

Comments

@NsCDE
Copy link
Contributor

NsCDE commented Apr 13, 2020

While performing testing function for issue #24 I FvwmPager occasionally dies.

This is a permanent "local" pager with only current desk and pages view.
It's configuration can be found here:

https://github.com/NsCDE/NsCDE/blob/rc20_pending/NsCDE/config/NsCDE-Pager-LocalPager.conf

Backtrace:

[New LWP 1002252]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/opt/fvwm3/libexec/fvwm3/3.0.0/FvwmPager 37 4 none 0 8 LocalPager * 3'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 DrawGrid (desk=desk@entry=0, erase=1, erase@entry=0, ew=, r=r@entry=0x7ffca7cee378) at x_pager.c:1768
1768 if(((mon->virtual_scr.CurrentDesk - desk1) == desk) && !ShapeLabels)
(gdb) bt full
#0 DrawGrid (desk=desk@entry=0, erase=1, erase@entry=0, ew=, r=r@entry=0x7ffca7cee378) at x_pager.c:1768
y =
y1 =
y2 =
x =
x1 =
x2 =
d =
w =
str = "\000\000\000\000\000\000\000\b\000\000\000\000\000\000"
ptr =
cs =
bound = {x = 0, y = 0, width = 327, height = 15}
region = 0x13b6fd0
mon = 0x0
#1 0x0000000000410f3d in HandleExpose (Event=0x7ffca7cee440) at x_pager.c:1334
i = 0
r = {x = 0, y = 0, width = 327, height = 15}
#2 0x00000000004121e0 in DispatchEvent (Event=Event@entry=0x7ffca7cee440) at x_pager.c:1077
i =
x = 0
y = 0
JunkRoot = 0
JunkChild = 0
w =
JunkX = 0
JunkY = 0
JunkMask = 0
keychar = 0 '\000'
keysym = 0
do_move_page = 0
dx = 0
dy = 0
mon = 0x0
#3 0x000000000040b5e7 in Loop (fd=fd@entry=0x44b8f8 ) at FvwmPager.c:515
Event =
{type = 12, xany = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296}, xkey = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, root = 0, subwindow = 64424509767, time = 597000454144, x = 0, y = 0, x_root = 2098365, y_root = 0, state = 0, keycode = 0, same_screen = 0}, xbutton = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, root = 0, subwindow = 64424509767, time = 597000454144, x = 0, y = 0, x_root = 2098365, y_root = 0, state = 0, button = 0, same_screen = 0}, xmotion = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, root = 0, subwindow = 64424509767, time = 597000454144, x = 0, y = 0, x_root = 2098365, y_root = 0, state = 0, is_hint = 0 '\000', same_screen = 0}, xcrossing = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, root = 0, subwindow = 64424509767, time = 597000454144, x = 0, y = 0, x_root = 2098365, y_root = 0, mode = 0, detail = 0, same_screen = 0, focus = 0, state = 0}, xfocus = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, mode = 0, detail = 0}, xexpose = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, x = 0, y = 0, width = 327, height = 15, count = 0}, xgraphicsexpose = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, drawable = 31457296, x = 0, y = 0, width = 327, height = 15, count = 0, major_code = 139, minor_code = 0}, xnoexpose = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, drawable = 31457296, major_code = 0, minor_code = 0}, xvisibility = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, state = 0}, xcreatewindow = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, parent = 31457296, window = 0, x = 327, y = 15, width = 0, height = 139, border_width = 0, override_redirect = 0}, xdestroywindow = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, event = 31457296, window = 0}, xunmap = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, event = 31457296, window = 0, from_configure = 327}, xmap = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, event = 31457296, window = 0, override_redirect = 327}, xmaprequest = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, parent = 31457296, window = 0}, xreparent = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, event = 31457296, window = 0, parent = 64424509767, x = 0, y = 139, override_redirect = 0}, xconfigure = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, event = 31457296, window = 0, x = 327, y = 15, width = 0, height = 139, border_width = 0, above = 2098365, override_redirect = 0}, xgravity = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, event = 31457296, window = 0, x = 327, y = 15}, xresizerequest = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, width = 0, height = 0}, xconfigurerequest = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, parent = 31457296, window = 0, x = 327, y = 15, width = 0, height = 139, border_width = 0, above = 2098365, detail = 0, value_mask = 0}, xcirculate = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, event = 31457296, window = 0, place = 327}, xcirculaterequest = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, parent = 31457296, window = 0, place = 327}, xproperty = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, atom = 0, time = 64424509767, state = 0}, xselectionclear = {type = 12, serial = --Type for more, q to quit, c to continue without paging--
4445, send_event = 0, display = 0x12b8c90, window = 31457296, selection = 0, time = 64424509767}, xselectionrequest = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, owner = 31457296, requestor = 0, selection = 64424509767, target = 597000454144, property = 0, time = 2098365}, xselection = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, requestor = 31457296, selection = 0, target = 64424509767, property = 597000454144, time = 0}, xcolormap = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, colormap = 0, new = 327, state = 15}, xclient = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, message_type = 0, format = 327, data = {b = "\000\000\000\000\213", '\000' <repeats 11 times>, "\275\004 ", s = {0, 0, 139, 0, 0, 0, 0, 0, 1213, 32}, l = {597000454144, 0, 2098365, 0, 0}}}, xmapping = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, request = 0, first_keycode = 0, count = 327}, xerror = {type = 12, display = 0x115d, resourceid = 0, serial = 19631248, error_code = 16 '\020', request_code = 0 '\000', minor_code = 224 '\340'}, xkeymap = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, window = 31457296, key_vector = "\000\000\000\000\000\000\000\000G\001\000\000\017\000\000\000\000\000\000\000\213\000\000\000\000\000\000\000\000\000\000"}, xgeneric = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, extension = 31457296, evtype = 0}, xcookie = {type = 12, serial = 4445, send_event = 0, display = 0x12b8c90, extension = 31457296, evtype = 0, cookie = 0, data = 0xf00000147}, pad = {12, 4445, 0, 19631248, 31457296, 0, 64424509767, 597000454144, 0, 2098365, 0 <repeats 14 times>}}
#4 0x0000000000407741 in main (argc=, argv=) at FvwmPager.c:491
itemp =
i =
line = "Desk 0\000\000\aP", '\000' <repeats 89 times>
opt_num =
JunkRoot = 511101108348
JunkChild = 0
JunkX = 0
JunkY = -1292853888
JunkMask = 32737
(gdb)

@NsCDE
Copy link
Contributor Author

NsCDE commented Apr 29, 2020

Ok, two issues here. Probably connected.

While running gdb on fvwm3 for other issue I noticed how FvwmPager also dies. I noticed that it doesn't appears when it should every time, but I was focusing on other issues then. Now, let's see today's core dump full backtrace:

Reading symbols from /opt/fvwm3/libexec/fvwm3/3.0.0/FvwmPager...
[New LWP 1941940]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/opt/fvwm3/libexec/fvwm3/3.0.0/FvwmPager 41 4 none 0 8 GlobalPager 0 3'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 update_pr_transparent_windows () at x_pager.c:1522
1522 n = mon->virtual_scr.VxMax / mon->virtual_scr.MyDisplayWidth;
(gdb) bt full
#0 update_pr_transparent_windows () at x_pager.c:1522
i =
j =
k =
cset =
n =
m =
w =
h =
t =
mon = 0x0
#1 0x0000000000409cb2 in My_XNextEvent (event=0x7ffcb9600010, dpy=0x709e40) at FvwmPager.c:1636
packet =
in_fdset = {fds_bits = {16, 0 <repeats 15 times>}}
miss_counter = 0
miss_counter = 0
#2 My_XNextEvent (dpy=0x709e40, event=0x7ffcb9600010) at FvwmPager.c:1599
miss_counter = 0
#3 0x000000000040b5d9 in Loop (fd=fd@entry=0x44b918 ) at FvwmPager.c:514
Event =
{type = 12, xany = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959}, xkey = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, root = 0, subwindow = 98784247843, time = 957777707008, x = 0, y = 0, x_root = 2098982, y_root = 0, state = 0, keycode = 0, same_screen = 7587344}, xbutton = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, root = 0, subwindow = 98784247843, time = 957777707008, x = 0, y = 0, x_root = 2098982, y_root = 0, state = 0, button = 0, same_screen = 7587344}, xmotion = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, root = 0, subwindow = 98784247843, time = 957777707008, x = 0, y = 0, x_root = 2098982, y_root = 0, state = 0, is_hint = 0 '\000', same_screen = 7587344}, xcrossing = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, root = 0, subwindow = 98784247843, time = 957777707008, x = 0, y = 0, x_root = 2098982, y_root = 0, mode = 0, detail = 0, same_screen = 7587344, focus = 0, state = 1920072256}, xfocus = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, mode = 0, detail = 0}, xexpose = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, x = 0, y = 0, width = 35, height = 23, count = 0}, xgraphicsexpose = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, drawable = 67108959, x = 0, y = 0, width = 35, height = 23, count = 0, major_code = 223, minor_code = 0}, xnoexpose = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, drawable = 67108959, major_code = 0, minor_code = 0}, xvisibility = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, state = 0}, xcreatewindow = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, parent = 67108959, window = 0, x = 35, y = 23, width = 0, height = 223, border_width = 0, override_redirect = 0}, xdestroywindow = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, event = 67108959, window = 0}, xunmap = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, event = 67108959, window = 0, from_configure = 35}, xmap = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, event = 67108959, window = 0, override_redirect = 35}, xmaprequest = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, parent = 67108959, window = 0}, xreparent = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, event = 67108959, window = 0, parent = 98784247843, x = 0, y = 223, override_redirect = 0}, xconfigure = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, event = 67108959, window = 0, x = 35, y = 23, width = 0, height = 223, border_width = 0, above = 2098982, override_redirect = 0}, xgravity = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, event = 67108959, window = 0, x = 35, y = 23}, xresizerequest = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, width = 0, height = 0}, xconfigurerequest = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, parent = 67108959, window = 0, x = 35, y = 23, width = 0, height = 223, border_width = 0, above = 2098982, detail = 0, value_mask = 7587344}, xcirculate = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, event = 67108959, window = 0, place = 35}, xcirculaterequest = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, parent = 67108959, window = 0, place = 35}, xproperty = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, atom = 0, time = 98784247843, state = 0}, xselectionclear = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, selection = 0, time = 98784247843}, xselectionrequest = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, owner = 67108959, requestor = 0, selection = 98784247843, target = 957777707008, property = 0, time = 2098982}, xselection = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, requestor = 67108959, selection = 0, target = 98784247843, property = 957777707008, time = 0}, xcolormap = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, colormap = 0, new = 35, state = 23}, xclient = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, message_type = 0, format = 35, data = {b = "\000\000\000\000\337", '\000' <repeats 11 times>, "&\a ", s = {0, 0, 223, 0, 0, 0, 0, 0, 1830, 32}, l = {957777707008, 0, 2098982, 0, 7587344}}}, xmapping = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, request = 0, first_keycode = 0, count = 35}, xerror = {type = 12, display = 0xcc3, resourceid = 0, serial = 7380544, error_code = 95 '_', request_code = 0 '\000', minor_code = 0 '\000'}, xkeymap = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, window = 67108959, key_vector = "\000\000\000\000\000\000\000\000#\000\000\000\027\000\000\000\000\000\000\000\337\000\000\000\000\000\000\000\000\000\000"}, xgeneric = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, extension = 67108959, evtype = 0}, xcookie = {type = 12, serial = 3267, send_event = 0, display = 0x709e40, extension = 67108959, evtype = 0, cookie = 0, data = 0x1700000023}, pad = {140389596004364, 3267, 0, 7380544, 67108959, 0, 98784247843, 957777707008, 0, 2098982, 0, 7587344, 140391516076608, 0, 0, 7599824, 140389596004355, 7599968, 0, 0, 2449, 7587344, 140391516076608, 0}}
#4 0x0000000000407741 in main (argc=, argv=) at FvwmPager.c:491
itemp =
i =
line = "Desk 3\000\000\aP", '\000' <repeats 89 times>
opt_num =
JunkRoot = 511101108348
JunkChild = 0
JunkX = 0
JunkY = 1924521344
JunkMask = 32687
(gdb)

@ThomasAdam
Copy link
Member

Ah, I see,

This is happening because of how FvwmPager is interpreting monitors when in global mode -- and so it gets the wrong moniotor and/or NULL monitor.

Will fix. Thanks for the backtrace.

@NsCDE
Copy link
Contributor Author

NsCDE commented Apr 29, 2020

FYI, I cannot reproduce strange effect of treating second screen side of the page as both monitors what I described in #51. It was one-time glitch. We will see ...

@ThomasAdam
Copy link
Member

In thinking about this...

  • global mode is straight forward as all screens are treated as one.
  • per-monitor pager needs to know which monitor to use.

I've already added a Monitor configuration option to FvwmPager to make it only track windows on that monitor.

I could make FvwmPager default to listening only to whichever screen it is on at the time, and make Monitor an explicit override of that behaviour. It would mean having a pager on ever monitor in per-monitor, unless the user then created their own pagers via Monitor.

Hmm....

@NsCDE
Copy link
Contributor Author

NsCDE commented May 3, 2020

Hi Thomas,

I didn't knew, but now I tried this new FvwmPager Monitor option in my Local (current desk only) and Global (all) desks configurations. Working in per-monitor mode. My observations are this: DeskTopScale (which I always use instead of Geometry directive) considers common joined dimensions of both monitors, not the configured one.

A bit of testing:

With value "Virtual-0" in configuration, on that monitor, when FvwmPager is started, it shows windows from both monitors. If started on second (opposite from configured) monitor, it (correctly?) shows windows from the first monitor only. With value "Virtual-1" in configuration, correct windows are shown when pager is started on Virtual-0, but all windows are shown if pager is started on (configured) Virtual-1.

Playing with pointer.screen macro:

*GlobalPager: Monitor $[pointer.screen] picks the current monitor as static configuration when configuration is read. Ok, expected.

*GlobalPager: Monitor $$[pointer.screen] has an effect like there is no Monitor option at all: all windows from both monitors are shown no matter from which monitor FvwmPager is started.

Thoughts:

Generally, I think that making monitor-only pager makes sense. Specially if there are monitors with different resolutions involved: FvwmPager if started all-in-one mode, to be correct, should pick highest resolution monitor, and pad with unused gray/whatever block that space on the other part of the page in another smaller resolution monitor. Starting two or more pagers which are following --right-of, --left-of --below or --above maybe makes more sense if user wants to call pager to see absolutly all.

I can think of this main pager calling modes then:

  1. Local pager which shows only current desk on $$[pointer.screen]
  2. Local pager which starts two or more pager windows showing current desk at more monitors, or one joined with possibly padded spaces on smaller resolution monitor
  3. Global pager which shows all desks on $$[pointer.screen]
  4. Global pager which shows all desks on all monitors by either presenting more pager windows, or combining them, and possibly padding spaces of the one with smaller resolution

Of course, this is for calling pagers like transient or in my case similar move/iconify mode. For swallowed pagers, starting pager for each monitor has to be handled with different class/resource name for proper swallowing for people who use that kind of configuration.

ThomasAdam added a commit that referenced this issue May 10, 2020
When a module requests M_CONFIG_INFO for Monitor, recalculate that per
module, rather than the other way round.

Should help fix #44
@ThomasAdam
Copy link
Member

Hi @NsCDE,

OK, I think I've fixed the segfaults. Have a look at ta/gh-44 which is based from current master.

It will probably look confusing if you're using per-monitor mode, but configuring FvwmPager with Monitor: will help with that.

I'll address some of your other ideas post-1.0.

Thanks!

Thomas

@NsCDE
Copy link
Contributor Author

NsCDE commented May 11, 2020

Hi @ThomasAdam,

I tested with desk-only and all-desks FvwmPager configuration and indeed I cannot trigger segfault. Tested in per-monitor and global mode.

Altrough, there are a bunch of inconsistencies in presenting what is on desks in per-monitor mode. With and without "Monitor: Virtual-0" or Virtual-1. Windows appear and dissapear depending on configuration of Monitor, monitor/screen context in which pager is started or presented etc. It is hard to conclude if something is on the right place, so accessing them when they are not shown (hidden even without "Monitor" in configuration) is possible only via WindowList. I will really like to describe what I see, but I'm not sure. I can make some mp4 after work, no time now ... but I will like to say what I see as a problem in present state with per-monitor and specially FvwmPager in it:

  • Desk backgrounds. Confuses all the time. For testing purposes, I'm going to disable backdrop engine in NsCDE and make FvwmBacker with static configuration of 16 black png backgrounds with big hardcoded desk number and page numbers on left and right corners on them. If I didn't forgot some simple dimensional fact, this should help a bit. :-)

  • Pager itself. When in "Monitor:" mode, it should be of the dimensions of that monitor when DesktopScale is used instead of Geometry. Even when forced into $[monitor.Virtual-0.width] it shows windows from other screen and window representations are enlonged.

  • "Monitor" option itself. For moving people who are changing connected monitors, this can change depending of name based on cabling technolgoy. I don't know if it is possible, but c for current or $$[pointer.screen] can be solution here, together with dynamic update of the contents if pager is moved across the monitors/screens.

  • In per-monitor mode, without bounding FvwmPager to one monitor it is really hard to present all the contents, because it may appear like it is in a "global" mode. If screens are split with lines or dashed lines, this clashes with page separators. Probably only solution for "all screens" mode is to stick two one-monitor-only FvwmPagers together --left-of, --right-of and so on ... speaking in RandR terms. This way, FvwmPager will most acurrately follow physical monitor reality.

ThomasAdam added a commit that referenced this issue May 11, 2020
When a module requests M_CONFIG_INFO for Monitor, recalculate that per
module, rather than the other way round.

Should help fix #44
@ThomasAdam ThomasAdam reopened this May 11, 2020
ThomasAdam pushed a commit that referenced this issue Jun 14, 2020
When FvwmPager is in "per-monitor" mode (that is, been configured with
"*FvwmPager: Monitor <name>"), it is only ever useful to show the
windows which are on that monitor.

To achieve this, we therfore need to translate the windows's coordinates
to the bounding "view" the monitor the window is on has (that is, its
own width/height).

Translate the window's position (which is relative to the entire XServer
display) to the appropriate monitor, and keep tracking where it is.

This rewrites the CalcGeom() function which previously used a "mirroring"
technique to reflect the bounds of the window in the pager.

Helps #44
@ThomasAdam ThomasAdam reopened this Jun 14, 2020
ThomasAdam pushed a commit that referenced this issue Jun 14, 2020
When FvwmPager is in "per-monitor" mode (that is, been configured with
"*FvwmPager: Monitor <name>"), it is only ever useful to show the
windows which are on that monitor.

To achieve this, we therfore need to translate the windows's coordinates
to the bounding "view" the monitor the window is on has (that is, its
own width/height).

Translate the window's position (which is relative to the entire XServer
display) to the appropriate monitor, and keep tracking where it is.

This rewrites the CalcGeom() function which previously used a "mirroring"
technique to reflect the bounds of the window in the pager.

Helps #44
ThomasAdam pushed a commit that referenced this issue Jun 14, 2020
When FvwmPager is in "per-monitor" mode (that is, been configured with
"*FvwmPager: Monitor <name>"), it is only ever useful to show the
windows which are on that monitor.

To achieve this, we therfore need to translate the windows's coordinates
to the bounding "view" the monitor the window is on has (that is, its
own width/height).

Translate the window's position (which is relative to the entire XServer
display) to the appropriate monitor, and keep tracking where it is.

This rewrites the CalcGeom() function which previously used a "mirroring"
technique to reflect the bounds of the window in the pager.

Helps #44
ThomasAdam pushed a commit that referenced this issue Jun 15, 2020
When FvwmPager is in "per-monitor" mode (that is, been configured with
"*FvwmPager: Monitor <name>"), it is only ever useful to show the
windows which are on that monitor.

To achieve this, we therfore need to translate the windows's coordinates
to the bounding "view" the monitor the window is on has (that is, its
own width/height).

Translate the window's position (which is relative to the entire XServer
display) to the appropriate monitor, and keep tracking where it is.

This rewrites the CalcGeom() function which previously used a "mirroring"
technique to reflect the bounds of the window in the pager.

Helps #44
ThomasAdam pushed a commit that referenced this issue Jun 15, 2020
When FvwmPager is in "per-monitor" mode (that is, been configured with
"*FvwmPager: Monitor <name>"), it is only ever useful to show the
windows which are on that monitor.

To achieve this, we therfore need to translate the windows's coordinates
to the bounding "view" the monitor the window is on has (that is, its
own width/height).

Translate the window's position (which is relative to the entire XServer
display) to the appropriate monitor, and keep tracking where it is.

This rewrites the CalcGeom() function which previously used a "mirroring"
technique to reflect the bounds of the window in the pager.

Helps #44
ThomasAdam pushed a commit that referenced this issue Jun 15, 2020
When FvwmPager is in "per-monitor" mode (that is, been configured with
"*FvwmPager: Monitor <name>"), it is only ever useful to show the
windows which are on that monitor.

To achieve this, we therfore need to translate the windows's coordinates
to the bounding "view" the monitor the window is on has (that is, its
own width/height).

Translate the window's position (which is relative to the entire XServer
display) to the appropriate monitor, and keep tracking where it is.

This rewrites the CalcGeom() function which previously used a "mirroring"
technique to reflect the bounds of the window in the pager.

Helps #44
ThomasAdam pushed a commit that referenced this issue Jun 15, 2020
When FvwmPager is in "per-monitor" mode (that is, been configured with
"*FvwmPager: Monitor <name>"), it is only ever useful to show the
windows which are on that monitor.

To achieve this, we therfore need to translate the windows's coordinates
to the bounding "view" the monitor the window is on has (that is, its
own width/height).

Translate the window's position (which is relative to the entire XServer
display) to the appropriate monitor, and keep tracking where it is.

This rewrites the CalcGeom() function which previously used a "mirroring"
technique to reflect the bounds of the window in the pager.

Helps #44
@ThomasAdam
Copy link
Member

ThomasAdam commented Jun 15, 2020

Hi,

Please do have a look at master now that I've merged this pull-request.

To configure FvwmPager instances to limit them to a specific monitor, you must now issue the following configuration line:

*FvwmPager: Monitor RandRName

Where FvwmPager is the module configuration alias you're using for FvwmPager, and RandRName denotes a specific monitor name.

This is mostly useful only where DesktopConfiguration per-monitor is in use.

The default behaviour of showing the global screen in FvwmPager is present when no Monitor configuration lines are used.

I'd be grateful for any testing you can give for this -- especially in DesktopConfiguration per-monitor mode. Although I've given it some testing, it won't be enough and so I am expecting some bugs.

Please open additional bugs separate to this one though as I'm now closing this.

mikeandmore pushed a commit to mikeandmore/fvwm3 that referenced this issue Nov 28, 2020
When a module requests M_CONFIG_INFO for Monitor, recalculate that per
module, rather than the other way round.

Should help fix fvwmorg#44
mikeandmore pushed a commit to mikeandmore/fvwm3 that referenced this issue Nov 28, 2020
When FvwmPager is in "per-monitor" mode (that is, been configured with
"*FvwmPager: Monitor <name>"), it is only ever useful to show the
windows which are on that monitor.

To achieve this, we therfore need to translate the windows's coordinates
to the bounding "view" the monitor the window is on has (that is, its
own width/height).

Translate the window's position (which is relative to the entire XServer
display) to the appropriate monitor, and keep tracking where it is.

This rewrites the CalcGeom() function which previously used a "mirroring"
technique to reflect the bounds of the window in the pager.

Helps fvwmorg#44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something's broken!
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants