[Gambas-user] gb.desktop.x11 LargeDesktop support

Bruce Steers bsteers4 at gmail.com
Mon Oct 31 21:57:09 CET 2022

On Sun, 30 Oct 2022 at 01:45, Bruce Steers <bsteers4 at gmail.com> wrote:

> well this works but the code probably sucks and could be done much better.
coded now to handle multiple screens (my desktop sizes were all wrong if
more than one screen attached)
so now it manages workspaces and switches workspaces and screens.

I added a class called BigScreen.class with .Width and .Height to get the
total screen size if more than one display attached or not.

calculates like this...
Static Private Sub GetSize()

  Dim hScreen As Screen

  For c As Integer = 0 To Screens.Count - 1
   hScreen = Screens[c]
    If Not c Then
      $iWidth = hScreen.Width
      $iHeight = hScreen.Height
      If hScreen.X = Screens[c - 1].X + Screens[c - 1].Width Then $iWidth
+= hScreen.Width
      If hScreen.X + hScreen.Width = Screens[c - 1].X Then $iWidth +=
      If hScreen.Y = Screens[c - 1].Y + Screens[c - 1].Height Then $iHeight
+= hScreen.Height
      If hScreen.X + hScreen.Height = Screens[c - 1].Y Then $iHeight +=

      $iWidth = Max($iWidth, hScreen.Width)
      $iHeight = Max($iHeight, hScreen.Height)



Sombody please steal my half assed code and make it perfect enough to add
to gambas


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221031/49768ec8/attachment.htm>

More information about the User mailing list