#PB_Window_Borderless

Linux specific forum
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

#PB_Window_Borderless

Post by srod »

PB 5.21LTS x64 Linux (Ubuntu 13.10)

Hi,

it seems that applying the #PB_Window_Borderless flag does not reduce the size of the window at all. In this way the height parameter for OpenWindow() is somewhat misleading as the specified height is being inflated as if there is a window title etc. This is certainly a discrepancy when compared to the behaviour under Windows in which the given height always equates to the height of the client area. It would be great if this could be changed.

Code: Select all

If OpenWindow(0, 0, 40, 220, 200, "ButtonGadgets", #PB_Window_BorderLess)
  ButtonGadget(0, 10, 0, 120, 200, "Standard Button")
    
  OpenWindow(1, 300, 40, 220, 200, "ButtonGadgets", 0)
  ButtonGadget(1, 10, 0, 120, 200, "Standard Button")
    
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
I may look like a mule, but I'm not a complete ass.
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: #PB_Window_Borderless

Post by Fred »

I can't reproduce that here, can anyone else confirm ?
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: #PB_Window_Borderless

Post by srod »

Hi Fred,

I have just tested again and with the above code, when the borderless window first appears, it has the wrong height. Click into the Window and it then resizes itself to be the correct height!

I suspect this is a problem with Ubuntu 13.10 x64 then.
I may look like a mule, but I'm not a complete ass.
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: #PB_Window_Borderless

Post by Fred »

Very wierd. I have tested on ubuntu 11.04 without issue.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: #PB_Window_Borderless

Post by srod »

If I throw a ResizeWindow(0, #PB_Ignore, #PB_Ignore, #PB_Ignore, 200) in, it fixes it!

As you say, it is a weird one. :)
I may look like a mule, but I'm not a complete ass.
User avatar
Shardik
Addict
Addict
Posts: 2067
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: #PB_Window_Borderless

Post by Shardik »

I have tested srod's code example with 9 different x86 Linux distributions and only Ubuntu 13.10 (with Unity) displays the error (and the readjustment after clicking onto the button or into the window) as described by srod. The following distributions don't show the error:
- Ubuntu 10.04 LTS x86 with Gnome 2
- Ubuntu 12.04 LTS x86 with Unity
- Ubuntu 13.04 x86 with Unity
- Fedora 20 x86 with Gnome 3
- Kubuntu 13.10 x86 with KDE
- Linux Mint 16 x86 with Cinnamon
- Lubuntu 13.10 x86 with LXDE
- Xubuntu 13.10 x86 with Xfce
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: #PB_Window_Borderless

Post by heartbone »

srod wrote:If I throw a ResizeWindow(0, #PB_Ignore, #PB_Ignore, #PB_Ignore, 200) in, it fixes it!
That's good to know as it may come in handy someday. Thanks.
Shardik wrote:I have tested srod's code example with 9 different x86 Linux distributions and only Ubuntu 13.10 (with Unity) displays the error (and the readjustment after clicking onto the button or into the window) as described by srod. The following distributions don't show the error:
- Ubuntu 10.04 LTS x86 with Gnome 2
- Ubuntu 12.04 LTS x86 with Unity
- Ubuntu 13.04 x86 with Unity
- Fedora 20 x86 with Gnome 3
- Kubuntu 13.10 x86 with KDE
- Linux Mint 16 x86 with Cinnamon
- Lubuntu 13.10 x86 with LXDE
- Xubuntu 13.10 x86 with Xfce
That's good to know. Now you have me wondering if the many bugs that I am seeing are related to the Saucy Salamander version of UBUNTU that I'm using for development.
Shardik, would you try out my glitchy code on some of these other Linux versions?
I only have access to 13.10 for development and I don't know if the problem is running the code in Saucy or compiling it in Saucy.
After reading the above, I tried a compiled version in a 13.04 UBUNTU and the glitchy program acted better, but the main reported problem persisted.
Keep it BASIC.
Post Reply