[GB.DESKTOP]

* NEW: DesktopWindow: Shaded is a new property that tells if a window is shaded (i.e. only its titlebar is visible).

git-svn-id: svn://localhost/gambas/trunk@8096 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2017-02-18 03:38:11 +00:00
parent de7c4e9f5a
commit 51dfdf0932
3 changed files with 28 additions and 13 deletions

View file

@ -417,6 +417,10 @@ Sticky
p
b
Shaded
p
b
_new
m

View file

@ -26,7 +26,7 @@ Geometry=[848,380,224,280]
Path="gb.desktop.gambas"
[FCommit]
LastCommit="[GB.DESKTOP]\n* NEW: Support for cygwin desktops."
LastCommit="[GB.DESKTOP]\n* BUG: A void atom name is now associated with the atom 0 (None)."
[OpenFile]
File[1]=".src/DesktopMime.class:22.357"

View file

@ -20,6 +20,7 @@ Property Maximized As Boolean
Property FullScreen As Boolean
Property SkipTaskbar As Boolean
Property Sticky As Boolean
Property Shaded As Boolean
Private $iId As Integer
Private $hGeom As Rect
@ -193,9 +194,7 @@ Private Function Maximized_Read() As Boolean
Dim aState As String[] = GetState()
If aState Then
Return aState.Find("_NET_WM_STATE_MAXIMIZED_VERT") >= 0 And aState.Find("_NET_WM_STATE_MAXIMIZED_HORZ") >= 0
Endif
If aState And If aState.Exist("_NET_WM_STATE_MAXIMIZED_VERT") And If aState.Exist("_NET_WM_STATE_MAXIMIZED_HORZ") Then Return True
End
@ -213,9 +212,7 @@ Private Function FullScreen_Read() As Boolean
Dim aState As String[] = GetState()
If aState Then
Return aState.Find("_NET_WM_STATE_FULLSCREEN") >= 0
Endif
If aState Then Return aState.Exist("_NET_WM_STATE_FULLSCREEN")
End
@ -233,9 +230,7 @@ Private Function SkipTaskbar_Read() As Boolean
Dim aState As String[] = GetState()
If aState Then
Return aState.Find("_NET_WM_STATE_SKIP_TASKBAR") >= 0
Endif
If aState Then Return aState.Exist("_NET_WM_STATE_SKIP_TASKBAR")
End
@ -253,9 +248,7 @@ Private Function Sticky_Read() As Boolean
Dim aState As String[] = GetState()
If aState Then
Return aState.Find("_NET_WM_STATE_STICKY") >= 0
Endif
If aState Then Return aState.Exist("_NET_WM_STATE_STICKY")
End
@ -314,3 +307,21 @@ Public Sub GetScreenshot(Optional WithoutFrame As Boolean) As Picture
Return Desktop.Screenshot(hRect.X, hRect.Y, hRect.W, hRect.H)
End
Private Function Shaded_Read() As Boolean
Dim aState As String[] = GetState()
If aState Then Return aState.Find("_NET_WM_STATE_SHADED") >= 0
End
Private Sub Shaded_Write(Value As Boolean)
If Value Then
SetState("_NET_WM_STATE_SHADED")
Else
ClearState("_NET_WM_STATE_SHADED")
Endif
End