Project

General

Profile

Feature #858202

Screen size detection for gui-gtk3.22+

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
gui-gtk-3.22
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Gtk deprecated the GdkScreen APIs we were using to gauge screen size, so we removed them from gui-gtk3.22 in gna patch #7877 . This left the Gtk3.22 client without a way to adapt to screen size.

It's possible to get a size from the GdkMonitor API to get the same sort of information. It's documented as new in Gtk3.22.

(I'm using gdk_display_get_primary_monitor() on the default display, which might not be where the user has launched Freeciv; but it's probably called too early for the alternative, gdk_display_get_monitor_at_window() , to be sensible. This is mostly about sensible defaults, anyway, so it's not critical to get the right monitor; only low_citydlg can't be overridden by the user.)

m-gtk322-4-adapt-screen-size.patch (3.92 KB) m-gtk322-4-adapt-screen-size.patch master (Gtk4 not tested) Jacob Nevins, 2020-02-02 04:20 AM
30-26-gtk322-adapt-screen-size.patch (2.14 KB) 30-26-gtk322-adapt-screen-size.patch S3_0, S2_6 Jacob Nevins, 2020-02-02 04:20 AM

Related issues

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

History

#1 Updated by Jacob Nevins 5 months ago

only low_citydlg can't be overridden by the user

...except with -- --resolution XxY, of course.

(Our previous behaviour was to use the normal city dialog.)

#2 Updated by Jacob Nevins 5 months ago

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

#4 Updated by Jacob Nevins 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF