View Issue Details

IDProjectCategoryView StatusLast Update
0037813PatchesWidgetsetpublic2020-09-26 11:33
ReporterSven Barth Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Platformx86_64OSLinux 
Product Version2.1 (SVN) 
Summary0037813: Fix compilation of CustomDrawn X11
DescriptionThe CustomDrawn-X11 widgetset currently does not compile, because of duplicated implementations of EnumDisplayMonitors and GetMonitorInfo. Considering that CustomDrawn X11 has an - apparently working - native implementation that should be used instead of the generic one.
Additional InformationAttached patch fixes this.
TagsNo tags attached.
Fixed in Revisionr63924
LazTarget-
WidgetsetCustomDrawn
Attached Files

Activities

Sven Barth

2020-09-24 22:31

manager  

customdrawn-x11-fix.patch (1,616 bytes)   
Index: lcl/interfaces/customdrawn/customdrawnwinapi.inc
===================================================================
--- lcl/interfaces/customdrawn/customdrawnwinapi.inc	(Revision 63919)
+++ lcl/interfaces/customdrawn/customdrawnwinapi.inc	(Arbeitskopie)
@@ -1508,11 +1508,13 @@
   System.EnterCriticalsection(ACritSec^);
 end;
 
+{$ifndef CD_UseNativeMonitors}
 function TCDWidgetSet.EnumDisplayMonitors(hdc: HDC; lprcClip: PRect;
   lpfnEnum: MonitorEnumProc; dwData: LPARAM): LongBool;
 begin
   Result := lpfnEnum(1, 0, nil, dwData);
 end;
+{$endif}
 
 (*
 function CharsetToQtCharSet(const ALCLCharset: Byte): QFontDatabaseWritingSystem;
@@ -2901,6 +2903,8 @@
     Result := 0;
 end;
 *)
+
+{$ifndef CD_UseNativeMonitors}
 function TCDWidgetSet.GetMonitorInfo(Monitor: HMONITOR; lpmi: PMonitorInfo): Boolean;
 begin
   Result := (lpmi <> nil) and (lpmi^.cbSize >= SizeOf(TMonitorInfo)) and (Monitor = 1);
@@ -2909,6 +2913,7 @@
   lpmi^.rcWork:=lpmi^.rcMonitor;
   lpmi^.dwFlags := MONITORINFOF_PRIMARY
 end;
+{$endif}
 (*
 {------------------------------------------------------------------------------
   Method:  TQtWidgetSet.GetDeviceSize
Index: lcl/interfaces/customdrawn/customdrawndefines.inc
===================================================================
--- lcl/interfaces/customdrawn/customdrawndefines.inc	(Revision 63919)
+++ lcl/interfaces/customdrawn/customdrawndefines.inc	(Arbeitskopie)
@@ -39,6 +39,9 @@
 {$if defined(CD_WINDOWS)}
   //{$define CD_UseNativeText}
 {$endif}
+{$if defined(CD_X11)}
+  {$define CD_UseNativeMonitors}
+{$endif}
 
 // ==================
 // Other options
customdrawn-x11-fix.patch (1,616 bytes)   

Juha Manninen

2020-09-26 11:33

developer   ~0125867

Applied, thanks.

Issue History

Date Modified Username Field Change
2020-09-24 22:31 Sven Barth New Issue
2020-09-24 22:31 Sven Barth File Added: customdrawn-x11-fix.patch
2020-09-26 11:28 Juha Manninen Assigned To => Juha Manninen
2020-09-26 11:28 Juha Manninen Status new => assigned
2020-09-26 11:33 Juha Manninen Status assigned => resolved
2020-09-26 11:33 Juha Manninen Resolution open => fixed
2020-09-26 11:33 Juha Manninen Fixed in Revision => r63924
2020-09-26 11:33 Juha Manninen LazTarget => -
2020-09-26 11:33 Juha Manninen Widgetset CustomDrawn => CustomDrawn
2020-09-26 11:33 Juha Manninen Note Added: 0125867