The following shows the diffstat and patchsets between eacaa8b..c0c149b^ ---------------------------------------------------------------- commit c0c149b0127ff9db67b53c6c91a81c28cb1fceb9 Author: Thomas Adam <tho...@fvwm.org> Date: Mon Dec 8 08:36:01 2014 +0000
Pager: Initialise specified monitor in config If the pager is told which monitor to use, pull the configuration for that monitor appropriately, and set the working width/height appropriately. --- modules/MvwmPager/MvwmPager.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/MvwmPager/MvwmPager.c b/modules/MvwmPager/MvwmPager.c index b6bd37e..7d0e077 100644 --- a/modules/MvwmPager/MvwmPager.c +++ b/modules/MvwmPager/MvwmPager.c @@ -854,7 +854,6 @@ void list_new_desk(unsigned long *body) oldDesk = FPScr.CurrentDesk; FPScr.CurrentDesk = (long)body[0]; FPScr.monitor_name = mvwm_strdup(monitor_by_number(body[1])->name); - fprintf(stderr, "MONITOR_NAME: <<%s>>\n", FPScr.monitor_name); if (fAlwaysCurrentDesk && oldDesk != FPScr.CurrentDesk) { PagerWindow *t; @@ -1593,6 +1592,10 @@ void ParseOptions(void) FPScr.VScale = 32; fpa.mask = 0; + + FPScr.MyDisplayWidth = DisplayWidth(dpy, FPScr.screen); + FPScr.MyDisplayHeight = DisplayHeight(dpy, FPScr.screen); + if (Pdepth <= 8) { fpa.mask |= FPAM_DITHER; @@ -2171,6 +2174,17 @@ void ParseOptions(void) } else if (StrEquals(resource, "Monitor")) { + char *mon_name; + struct monitor *mon = NULL; + + mon_name = mvwm_strdup(arg1); + mon = monitor_by_name(mon_name); + + /* XXX FIXME: Need to account for coord.x/coord.y!!! */ + FPScr.MyDisplayWidth = mon->coord.w; + FPScr.MyDisplayHeight = mon->coord.h; + + free(mon_name); } free(resource); commit 9744ac70fcb0931a70b942e51e3198e721b97d14 Author: Thomas Adam <tho...@fvwm.org> Date: Sun Nov 2 18:39:34 2014 +0000 WIP; moving monitor information into desk/page, etc. --- modules/MvwmIdent/MvwmIdent.h | 1 + modules/MvwmPager/MvwmPager.c | 8 +++++--- modules/MvwmPager/MvwmPager.h | 1 + mvwm/module_interface.c | 9 ++++++--- mvwm/virtual.c | 22 +++++++++++++++------- 5 files changed, 28 insertions(+), 13 deletions(-) diff --git a/modules/MvwmIdent/MvwmIdent.h b/modules/MvwmIdent/MvwmIdent.h index a14fb1d..f3ba698 100644 --- a/modules/MvwmIdent/MvwmIdent.h +++ b/modules/MvwmIdent/MvwmIdent.h @@ -22,6 +22,7 @@ struct target_struct long height_inc; long desktop; long layer; + long monitor_id; unsigned long gravity; window_flags flags; long title_h; diff --git a/modules/MvwmPager/MvwmPager.c b/modules/MvwmPager/MvwmPager.c index aab2353..b6bd37e 100644 --- a/modules/MvwmPager/MvwmPager.c +++ b/modules/MvwmPager/MvwmPager.c @@ -853,6 +853,8 @@ void list_new_desk(unsigned long *body) oldDesk = FPScr.CurrentDesk; FPScr.CurrentDesk = (long)body[0]; + FPScr.monitor_name = mvwm_strdup(monitor_by_number(body[1])->name); + fprintf(stderr, "MONITOR_NAME: <<%s>>\n", FPScr.monitor_name); if (fAlwaysCurrentDesk && oldDesk != FPScr.CurrentDesk) { PagerWindow *t; @@ -1590,9 +1592,6 @@ void ParseOptions(void) FPScr.Hilite = NULL; FPScr.VScale = 32; - FPScr.MyDisplayWidth = DisplayWidth(dpy, FPScr.screen); - FPScr.MyDisplayHeight = DisplayHeight(dpy, FPScr.screen); - fpa.mask = 0; if (Pdepth <= 8) { @@ -2170,6 +2169,9 @@ void ParseOptions(void) free(BalloonFormatString); CopyString(&BalloonFormatString,arg1); } + else if (StrEquals(resource, "Monitor")) + { + } free(resource); free(arg1); diff --git a/modules/MvwmPager/MvwmPager.h b/modules/MvwmPager/MvwmPager.h index 4abe3f0..33a06c7 100644 --- a/modules/MvwmPager/MvwmPager.h +++ b/modules/MvwmPager/MvwmPager.h @@ -39,6 +39,7 @@ typedef struct MvwmPagerScreenInfo int Vx; /* Current loc for top left of virt desk */ int Vy; int CurrentDesk; + char *monitor_name; Pixmap sticky_gray_pixmap; Pixmap light_gray_pixmap; Pixmap gray_pixmap; diff --git a/mvwm/module_interface.c b/mvwm/module_interface.c index a5c0f6f..cae2efc 100644 --- a/mvwm/module_interface.c +++ b/mvwm/module_interface.c @@ -857,15 +857,18 @@ void CMD_Send_WindowList(F_CMD_ARGS) { return; } - SendPacket(mod, M_NEW_DESK, 1, (long)m->virtual_scr.CurrentDesk); + SendPacket(mod, M_NEW_DESK, 2, + (long)m->virtual_scr.CurrentDesk, + (long)m->number); SendPacket( - mod, M_NEW_PAGE, 7, (long)m->virtual_scr.Vx, + mod, M_NEW_PAGE, 8, (long)m->virtual_scr.Vx, (long)m->virtual_scr.Vy, (long)m->virtual_scr.CurrentDesk, (long)m->coord.w, (long)m->coord.h, (long)((m->virtual_scr.VxMax / m->coord.w) + 1), - (long)((m->virtual_scr.VyMax / m->coord.h) + 1)); + (long)((m->virtual_scr.VyMax / m->coord.h) + 1), + (long)m->number); if (Scr.Hilite != NULL) { diff --git a/mvwm/virtual.c b/mvwm/virtual.c index 350de4c..26a8c6a 100644 --- a/mvwm/virtual.c +++ b/mvwm/virtual.c @@ -1282,11 +1282,12 @@ void MoveViewport(struct monitor *m, int newx, int newy, Bool grab) if (deltax || deltay) { BroadcastPacket( - M_NEW_PAGE, 7, (long)m->virtual_scr.Vx, (long)m->virtual_scr.Vy, + M_NEW_PAGE, 8, (long)m->virtual_scr.Vx, (long)m->virtual_scr.Vy, (long)m->virtual_scr.CurrentDesk, (long)m->coord.w, (long)m->coord.h, (long)((m->virtual_scr.VxMax / m->coord.w) + 1), - (long)((m->virtual_scr.VyMax / m->coord.h) + 1)); + (long)((m->virtual_scr.VyMax / m->coord.h) + 1), + (long)m->number); /* * RBW - 11/13/1998 - new: chase the chain @@ -1458,7 +1459,9 @@ void goto_desk(int desk, struct monitor *m) m->virtual_scr.CurrentDesk = desk; MapDesk(m, desk, True); focus_grab_buttons_all(); - BroadcastPacket(M_NEW_DESK, 1, (long)m->virtual_scr.CurrentDesk); + BroadcastPacket(M_NEW_DESK, 2, + (long)m->virtual_scr.CurrentDesk, + (long)m->number); /* FIXME: domivogt (22-Apr-2000): Fake a 'restack' for sticky * window upon desk change. This is a workaround for a * problem in MvwmPager: The pager has a separate 'root' @@ -2102,13 +2105,14 @@ void CMD_DesktopSize(F_CMD_ARGS) m->virtual_scr.VyMax = (val[1] <= 0) ? 0: val[1] * m->coord.h - m->coord.h; BroadcastPacket( - M_NEW_PAGE, 7, (long)m->virtual_scr.Vx, + M_NEW_PAGE, 8, (long)m->virtual_scr.Vx, (long)m->virtual_scr.Vy, (long)m->virtual_scr.CurrentDesk, (long)m->coord.w, (long)m->coord.h, (long)((m->virtual_scr.VxMax / m->coord.w) + 1), - (long)((m->virtual_scr.VyMax / m->coord.h) + 1)); + (long)((m->virtual_scr.VyMax / m->coord.h) + 1), + (long)m->number); checkPanFrames(); EWMH_SetDesktopGeometry(m); @@ -2185,7 +2189,9 @@ void CMD_GotoDeskAndPage(F_CMD_ARGS) m->virtual_scr.CurrentDesk = val[0]; MapDesk(m, val[0], True); focus_grab_buttons_all(); - BroadcastPacket(M_NEW_DESK, 1, (long)m->virtual_scr.CurrentDesk); + BroadcastPacket(M_NEW_DESK, 2, + (long)m->virtual_scr.CurrentDesk, + (long)m->number); /* FIXME: domivogt (22-Apr-2000): Fake a 'restack' for sticky * window upon desk change. This is a workaround for a * problem in MvwmPager: The pager has a separate 'root' @@ -2199,7 +2205,9 @@ void CMD_GotoDeskAndPage(F_CMD_ARGS) } else { - BroadcastPacket(M_NEW_DESK, 1, (long)m->virtual_scr.CurrentDesk); + BroadcastPacket(M_NEW_DESK, 2, + (long)m->virtual_scr.CurrentDesk, + (long)m->number); } EWMH_SetCurrentDesktop(m); ---------------------------------------------------------------- Diffstat: ---------------------------------------------------------------- modules/MvwmIdent/MvwmIdent.h | 1 + modules/MvwmPager/MvwmPager.c | 18 +++++++++++++++++- modules/MvwmPager/MvwmPager.h | 1 + mvwm/module_interface.c | 9 ++++++--- mvwm/virtual.c | 22 +++++++++++++++------- 5 files changed, 40 insertions(+), 11 deletions(-) ----------------------------------------------------------------