Project

General

Profile

Bug #858203

client_option_adjust_defaults() runs too early

Added by Jacob Nevins 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Client
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

As noted in #765941-11:

The client_option_adjust_defaults() mechanism for dynamic, client-specific defaults is only used by the Gtk clients, to adapt to screen size. In that context, it runs too early; it runs from client_main() calling options_load() before any other GUI-specific code has run.

Consequences:
  • gtk_init() not called, so the screen size probing doesn't return a definite result and no adjustment is made
  • GUI-specific option -- --resolution not yet parsed, so that can't affect adjustment either

Patch will remove this client-independent mechanism, and for Gtk call the existing adjustments around the same time as option migration, which is late enough to avoid the above problems. This will make the first-run adjustments work a lot more of the time.

m-no-client-adjust-defaults.patch (10.5 KB) m-no-client-adjust-defaults.patch master (Gtk4 not tested) Jacob Nevins, 2020-02-02 04:23 AM
30-no-client-adjust-defaults.patch (10 KB) 30-no-client-adjust-defaults.patch S3_0 Jacob Nevins, 2020-02-02 04:23 AM
26-no-client-adjust-defaults.patch (11.1 KB) 26-no-client-adjust-defaults.patch S2_6 Jacob Nevins, 2020-02-02 04:23 AM

Related issues

Blocks Freeciv - Bug #765941: Gtk3.x automatic initial setting of "Arrange widgets for small displays" is ineffectiveClosed

Blocked by Freeciv - Bug #857675: Treat client option file load failure as first runClosed

Blocks Freeciv - Bug #858208: Various bugs in GUI option migrationClosed

History

#1 Updated by Jacob Nevins 5 months ago

  • Blocks Bug #765941: Gtk3.x automatic initial setting of "Arrange widgets for small displays" is ineffective added

#3 Updated by Jacob Nevins 5 months ago

  • Blocked by Bug #857675: Treat client option file load failure as first run added

#4 Updated by Jacob Nevins 5 months ago

  • Blocks Bug #858208: Various bugs in GUI option migration added

#5 Updated by Jacob Nevins 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF