Commit 4025656e authored by Jonathan Waddell's avatar Jonathan Waddell Committed by Aaron Plattner

Allow Mosaic configuration when a screen is selected.

Right now, the Enable Mosaic button is only validated properly and shown when a Display object is selected on the Display Config page of nvidia-settings. Mosaic support is a feature of the gpu and shouldn't depend on if a Display or Screen is selected. This change adds the validation and activation of the Mosaic feature with a Screen selection in addition to the existing Display selection.
parent 52d37bf6
......@@ -2541,19 +2541,30 @@ static void setup_mosaic_config(CtkDisplayConfig *ctk_object)
nvDisplayPtr display = ctk_display_layout_get_selected_display
nvScreenPtr screen = ctk_display_layout_get_selected_screen
nvGpuPtr gpu;
const char *tooltip;
const gchar *label;
gboolean display_gpu_support_mosaic = (display && display->gpu &&
display->gpu->mosaic_type != MOSAIC_TYPE_UNSUPPORTED);
gboolean screen_gpu_support_mosaic = (screen && screen->display_owner_gpu &&
screen->display_owner_gpu->mosaic_type != MOSAIC_TYPE_UNSUPPORTED);
if (!display || !display->gpu || !ctk_object->advanced_mode ||
display->gpu->mosaic_type == MOSAIC_TYPE_UNSUPPORTED) {
if (!ctk_object->advanced_mode ||
(!display_gpu_support_mosaic && !screen_gpu_support_mosaic)) {
gpu = display->gpu;
if (display_gpu_support_mosaic) {
gpu = display->gpu;
} else {
gpu = screen->display_owner_gpu;
switch (gpu->mosaic_type) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment