View Issue Details

IDProjectCategoryView StatusLast Update
0021816LazarusLCLpublic2017-05-01 13:49
ReporterCraig Peterson Assigned ToZeljan Rikalo  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Target Version1.8Fixed in Version1.9 (SVN) 
Summary0021816: Carbon: Add SW_RESTORE support to LCLIntf.ShowWindow
DescriptionThis adds support for the SW_RESTORE flag to the Carbon implementation of ShowWindow. AFAIK, it's not used in Lazarus itself, but this increases Win32 compatibility.
TagsNo tags attached.
Fixed in Revision54792
LazTarget1.8
WidgetsetCarbon
Attached Files

Activities

2012-04-20 17:23

 

SW_RESTORE.patch (691 bytes)   
Index: lcl/interfaces/carbon/carbonprivatewindow.inc
===================================================================
--- lcl/interfaces/carbon/carbonprivatewindow.inc	(revision 36934)
+++ lcl/interfaces/carbon/carbonprivatewindow.inc	(working copy)
@@ -1942,6 +1942,16 @@
       if OSError(CollapseWindow(fWindowRef, True),
         Self, SName, SCollapse) then Exit;
     end;
+  SW_RESTORE:
+    begin
+      if IsIconic then
+        SetForeground
+      else if IsZoomed then begin
+        if OSError(ZoomWindowIdeal(fWindowRef, inZoomIn, P),
+          Self, SName, SZoomIdeal, 'inZoomIn') then Exit;
+        SetForeground;
+      end;
+    end;
   end;
 
   Result := True;
SW_RESTORE.patch (691 bytes)   

CudaText man

2017-05-01 13:24

reporter   ~0100031

Tested pch on OSX 10.8
After sw_maximize, sw_restore works
After sw_minimize, sw_restore works
It is good, apply it

Zeljan Rikalo

2017-05-01 13:49

developer   ~0100036

Please test and close if ok. I'll add this commit to the merge list for laz 1.8.
Thanks for the patch.

Issue History

Date Modified Username Field Change
2012-04-20 17:23 Craig Peterson New Issue
2012-04-20 17:23 Craig Peterson File Added: SW_RESTORE.patch
2012-04-20 17:23 Craig Peterson Widgetset => Carbon
2017-05-01 13:24 CudaText man Note Added: 0100031
2017-05-01 13:42 Zeljan Rikalo Assigned To => Zeljan Rikalo
2017-05-01 13:42 Zeljan Rikalo Status new => assigned
2017-05-01 13:49 Zeljan Rikalo Fixed in Revision => 54792
2017-05-01 13:49 Zeljan Rikalo LazTarget => 1.8
2017-05-01 13:49 Zeljan Rikalo Note Added: 0100036
2017-05-01 13:49 Zeljan Rikalo Status assigned => resolved
2017-05-01 13:49 Zeljan Rikalo Fixed in Version => 1.9 (SVN)
2017-05-01 13:49 Zeljan Rikalo Resolution open => fixed
2017-05-01 13:49 Zeljan Rikalo Target Version => 1.8