From 21ec506dfdc49562b0f6aecb3aa6e5eee17d7d3b Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 22 Apr 2020 21:01:38 +0100 Subject: [PATCH] randr - provide dialog telling the user they have no screens this shouldn't be a state to find yourself in... so let the user know they are in that broken state with a dialog. --- src/bin/e_comp_x_randr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/bin/e_comp_x_randr.c b/src/bin/e_comp_x_randr.c index 6d4650548..5056b0a57 100644 --- a/src/bin/e_comp_x_randr.c +++ b/src/bin/e_comp_x_randr.c @@ -433,6 +433,20 @@ _mode_screen_find(Ecore_X_Window root, E_Randr2_Screen *s, Ecore_X_Randr_Output return mode; } +static Eina_Bool +_cb_no_outputs_timer(void *data EINA_UNUSED) +{ + e_util_dialog_show(_("Screen setup Error"), + _("You seem to have no screens configured to
" + "be on given the outputs you have. This should
" + "be fixed by going to:
" + "
" + "Settings -> Screen -> Screen Setup
" + "
" + "And configure at least one screen to be on.")); + return EINA_FALSE; +} + E_API void e_comp_x_randr_init(void) { @@ -626,6 +640,7 @@ e_comp_x_randr_config_apply(void) else { printf("RRR: EERRRRRROOOORRRRRRR no outputs to configure!\n"); + ecore_timer_add(5.0, _cb_no_outputs_timer, NULL); ecore_x_root_screen_barriers_set(NULL, 0); } }