It is currently Fri Jul 20, 2018 6:08 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [DONE] PB 5.61 - StickyWindow Broken
PostPosted: Wed Nov 01, 2017 7:49 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 341
Location: Canada
Hello everyone,

The following code explain everything.

Code:
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Project name : StickyWindow
; File Name : StickyWindow Broken.pb
; File version: 1.0.0
; Programming : BUG Demonstrator
; Programmed by : StarBootics
; Date : 01-11-2017
; Last Update : 01-11-2017
; PureBasic code : V5.61 x64
; Platform : Ubuntu 17.10 x64
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Apparently the "StickyWindow()" instruction is
; broken. In the following example when the button
; is clicked the Window should stay on top but no.
;
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

If OpenWindow(0, 0, 0, 400, 300, "Exemple...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
 
  ButtonGadget  (1, 10, 60, 200, 30, "Fenêtre toujours au premier plan")
 
  Repeat
    Event = WaitWindowEvent()
   
    Select Event
       
      Case #PB_Event_Gadget
        Select EventGadget()
          Case 1
           
            StickyWindow(0, 1)
            Debug "The window should remain on top !"
           
        EndSelect
       
    EndSelect
  Until Event = #PB_Event_CloseWindow
EndIf

; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<


EDIT : The bug disappear in Ubuntu 18.04 and PB 5.62

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Last edited by StarBootics on Thu May 03, 2018 5:48 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.61 - StickyWindow Broken
PostPosted: Wed Nov 01, 2017 9:41 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Aug 30, 2007 11:54 pm
Posts: 729
Location: right here
Hi
On my System the Window is only covered by the PB Debug Window, because that is sticky itself.
Ubuntu 16.04, pb 5.60 x64, pb 5.61 x64


Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.61 - StickyWindow Broken
PostPosted: Thu Nov 02, 2017 7:46 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Jun 26, 2014 9:17 am
Posts: 282
Location: Germany
I can't confirm that. StickyWindow() works on all my installations.

StickyWindow() will first will be executed from your program and then by the debug window.
I'm guessing the last call wins but both windows stay on top, dependent which one from both has the focus.

It is possible that you're just out of luck and your window manager simply ignores this (maybe Ubuntu changed it in 17.10 instead of Unity), see the description for gtk_window_set_keep_above(,): https://developer.gnome.org/gtk3/unstable/GtkWindow.html#gtk-window-set-keep-above, first paragraph.

Regards, Charly

_________________
PureBasic 5.3-5.5, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de


Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.61 - StickyWindow Broken
PostPosted: Thu May 03, 2018 2:41 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 341
Location: Canada
Hello everyone,

Apparently the original problems came from Ubuntu 17.10 it's self. I just try the code I have given in the 1st post with Ubuntu 18.04 and PB 5.62 and everything work fine.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye