Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-03

Last diff for MonitorCount

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexey

diff has 3 places of same (almost) text:

-    Result := nil;
+  if (MonitorHandle = 0) and (MonitorDefault = mdNull) then
+    Result := nil
+  else
+  begin
+    // the user expects some monitor but handle wasn't found -> the
monitor list has probably changed
+    UpdateMonitors;
+    for i := 0 to MonitorCount - 1 do
+      if Monitors[i].Handle = MonitorHandle then
+        Exit(Monitors[i]);
+    RaiseGDBException('TScreen.MonitorFromWindow'); // internal error
+  end;

This is good to put to procedure with AErrorMsg: string.

Regards, Alexey

Reply by email