Преглед изворни кода

Fix: SetShape() for GTK to make windows move- and resizable (#67)

Ronny Otto пре 2 година
родитељ
комит
c8b0edf7c5
1 измењених фајлова са 10 додато и 0 уклоњено
  1. 10 0
      gtk3maxgui.mod/gtkgadget.bmx

+ 10 - 0
gtk3maxgui.mod/gtkgadget.bmx

@@ -810,6 +810,16 @@ Type TGTKWindow Extends TGTKContainer
 			ignoreSizeEvent = True
 			ignoreSizeEvent = True
 		End If
 		End If
 		Super.SetShape(Max(x, 0), Max(y, 0), w, h)
 		Super.SetShape(Max(x, 0), Max(y, 0), w, h)
+
+		'actually move/resize
+		'using the ignore* saves from backupping old position
+		'and sizes before calling "SetShape()"
+		If ignoreMoveEvent Then
+			gtk_window_move(handle, x, y)
+		End If
+		If ignoreSizeEvent Then
+			gtk_window_resize(handle, w, h)
+		End If
 	End Method
 	End Method
 
 
 	Rem
 	Rem