diff --git a/fvwm/conditional.c b/fvwm/conditional.c index d9deb6cdc..63189a480 100644 --- a/fvwm/conditional.c +++ b/fvwm/conditional.c @@ -901,7 +901,7 @@ Bool MatchesConditionMask(FvwmWindow *fw, WindowConditionMask *mask) if (mask->my_flags.do_check_page || mask->my_flags.do_check_desk_and_page) { - if (FScreenIsEnabled() && !mask->my_flags.do_not_check_screen) + if (!mask->my_flags.do_not_check_screen) { is_on_page = !!FScreenIsRectangleOnScreen( NULL, FSCREEN_CURRENT, &(fw->g.frame)); diff --git a/fvwm/move_resize.c b/fvwm/move_resize.c index bf44dbe35..84ebb4263 100644 --- a/fvwm/move_resize.c +++ b/fvwm/move_resize.c @@ -2260,7 +2260,7 @@ static void DoSnapAttract( } } /* Resist moving windows between xineramascreens */ - if (fw->edge_resistance_xinerama_move > 0 && FScreenIsEnabled()) + if (fw->edge_resistance_xinerama_move) { int scr_x0, scr_y0; int scr_x1, scr_y1; diff --git a/fvwm/placement.c b/fvwm/placement.c index 0193691d2..899a83a5e 100644 --- a/fvwm/placement.c +++ b/fvwm/placement.c @@ -2131,39 +2131,36 @@ static void __explain_placement(FvwmWindow *fw, pl_reason_t *reason) s += strlen(s); } /* screen */ - if (FScreenIsEnabled() == True) + switch (reason->screen.reason) + { + case PR_SCREEN_CURRENT: + r = "current screen"; + break; + case PR_SCREEN_STYLE: + r = "specified by style"; + break; + case PR_SCREEN_X_RESOURCE_FVWMSCREEN: + r = "specified by 'fvwmscreen' X resource"; + break; + case PR_SCREEN_IGNORE_CAPTURE: + r = "window was (re)captured"; + break; + default: + r = "bug"; + break; + } + sprintf( + s, " screen: %s: %d %d %dx%d (%s)\n", + reason->screen.screen, reason->screen.g.x, + reason->screen.g.y, reason->screen.g.width, + reason->screen.g.height, r); + s += strlen(s); + if (reason->screen.was_modified_by_ewmh_workingarea == 1) { - switch (reason->screen.reason) - { - case PR_SCREEN_CURRENT: - r = "current screen"; - break; - case PR_SCREEN_STYLE: - r = "specified by style"; - break; - case PR_SCREEN_X_RESOURCE_FVWMSCREEN: - r = "specified by 'fvwmscreen' X resource"; - break; - case PR_SCREEN_IGNORE_CAPTURE: - r = "window was (re)captured"; - break; - default: - r = "bug"; - break; - } sprintf( - s, " screen: %s: %d %d %dx%d (%s)\n", - reason->screen.screen, reason->screen.g.x, - reason->screen.g.y, reason->screen.g.width, - reason->screen.g.height, r); + s, " (screen area modified by EWMH working" + " area)\n"); s += strlen(s); - if (reason->screen.was_modified_by_ewmh_workingarea == 1) - { - sprintf( - s, " (screen area modified by EWMH working" - " area)\n"); - s += strlen(s); - } } /* position */ is_placed_by_algo = 0; diff --git a/libs/FScreen.c b/libs/FScreen.c index de038c8cb..1f328152c 100644 --- a/libs/FScreen.c +++ b/libs/FScreen.c @@ -70,11 +70,6 @@ static void GetMouseXY(XEvent *eventp, int *x, int *y) disp, DefaultRootWindow(disp), eventp, x, y); } -Bool FScreenIsEnabled(void) -{ - return (IS_RANDR_ENABLED); -} - struct monitor * monitor_new(void) { @@ -483,7 +478,7 @@ void FScreenInit(Display *dpy) is_randr_present = true; - if (FScreenIsEnabled() && !is_randr_present) { + if (!is_randr_present) { /* Something went wrong. */ fvwm_debug(__func__, "Couldn't initialise XRandR: %s\n", strerror(errno)); diff --git a/libs/FScreen.h b/libs/FScreen.h index d7addbe50..c2746141d 100644 --- a/libs/FScreen.h +++ b/libs/FScreen.h @@ -165,7 +165,6 @@ extern int randr_event; extern const char *prev_focused_monitor; /* Control */ -Bool FScreenIsEnabled(void); void FScreenInit(Display *dpy); void FScreenSelect(Display *dpy); void FScreenSetPrimaryScreen(int scr); diff --git a/modules/FvwmIdent/FvwmIdent.c b/modules/FvwmIdent/FvwmIdent.c index 237635e26..96d862f54 100644 --- a/modules/FvwmIdent/FvwmIdent.c +++ b/modules/FvwmIdent/FvwmIdent.c @@ -385,7 +385,7 @@ void list_configure(unsigned long *body) target.monitor_id = cfgpacket->monitor_id; target.monitor = fxstrdup("unknown"); - if (FScreenIsEnabled()) { + { free(target.monitor); target.monitor = fxstrdup( monitor_by_output((int)target.monitor_id)->si->name);