mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-26 03:09:31 +02:00
Merge branch 'Gtk3Monitor' into 'main'
GTK3: Fixed workarea handling on systems with frequent monitor removals. Issue #40333. See merge request freepascal.org/lazarus/lazarus!213
This commit is contained in:
commit
640eca41e2
@ -3949,6 +3949,11 @@ begin
|
||||
SPI_GETWORKAREA: begin
|
||||
pdisp:=TGdkDisplay.get_default;
|
||||
pmon:=pdisp^.get_primary_monitor();
|
||||
if not Assigned(pmon) then begin
|
||||
if pdisp^.get_n_monitors = 0 then
|
||||
Exit(False);
|
||||
pmon := pdisp^.get_monitor(0);
|
||||
end;
|
||||
pmon^.get_workarea(@wa);
|
||||
pr:=PRect(pvParam);
|
||||
pr^.Left:=wa.x;
|
||||
|
Loading…
Reference in New Issue
Block a user