It is currently Mon Oct 21, 2019 4:06 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: PB5.7x qt: More Window incompatibilities (minimize, Focus)
PostPosted: Sat Oct 05, 2019 4:42 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Jun 26, 2014 9:17 am
Posts: 308
Location: Germany
Some further incompatibilities of the subsystem qt compared to Gtk2, Gtk3 and Windows.

On my main system (Xubuntu 18.04, x64), the command GetActiveWindow() will always return -1, even if I use SetActiveWindow(#Window).

If I use SetActiveWindow(#Window) before, minimizing the window with SetWindowState(#Window, #PB_Window_Minimize) under Qt doesn't work!
An example...
Code:
EnableExplicit

; Object constants
#Win_Main  = 10


Global.i gEvent, gQuit

Procedure Create_WinMain()
   If OpenWindow(#Win_Main, 300, 200, 600, 200, "Window minimize & 'GetActiveWindow()' incompatibility on qt ", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget)
      
   EndIf
EndProcedure

Create_WinMain()

Debug GetActiveWindow()
;shows -1 on qt but 10 on gtk2, gtk3, Windows

SetActiveWindow(#Win_Main);             Try it under qt with this line commented out!

Debug GetActiveWindow()
;shows again -1 on qt but a correct 10 on gtk2, gtk3, Windows

;If 'SetActiveWindow(#Win_Main)' not commented out, the following command does not iconify the window under qt. Gtk2, gtk3, Windows is okay.
SetWindowState(#Win_Main, #PB_Window_Minimize)

Repeat
   gEvent= WaitWindowEvent()
   
   Select gEvent
      Case #PB_Event_CloseWindow
         gQuit= #True
         
   EndSelect
   
Until gQuit
Regards, Charly

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


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

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