Debug window not always in front when DPI aware executable

Windows specific forum
coco2
Enthusiast
Enthusiast
Posts: 368
Joined: Mon Nov 25, 2013 5:38 am
Location: Australia

Debug window not always in front when DPI aware executable

Post by coco2 »

When running code with Enable DPI Aware Executable selected in compiler options and a windowed screen the debug window will not remain "always on top" even it is set to. You can test this by running the following code with the "Enable DPI Aware Executable". I'm not actually sure what causes it but it's linked to my single 4K monitor, it only does it on that.

Code: Select all

ExamineDesktops()
Width = DesktopWidth(0)
Height = DesktopHeight(0)
InitSprite()
OpenWindow(0, 0, 0, Width, Height, "Test Debug", #PB_Window_Maximize | #PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0)*DesktopResolutionX(), WindowHeight(0)*DesktopResolutionY(), #False, 0, 0, #PB_Screen_WaitSynchronization)
Debug "Test"
InitKeyboard()
Repeat
  Event = WindowEvent()
  ExamineKeyboard()
  Delay(20)
  FlipBuffers()
Until Event = #PB_Event_CloseWindow Or KeyboardPushed(#PB_Key_Escape)
Fred
Administrator
Administrator
Posts: 16681
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Debug window not always in front when DPI aware executable

Post by Fred »

I can reproduce it here as well and it seems like a third party program (here Radeon stuff) put the window on top when it detect a fullscreen opengl window.
If it's not fullscreen, no problem:

Code: Select all

ExamineDesktops()
Width = DesktopWidth(0)
Height = DesktopHeight(0)/2
; Height = DesktopHeight(0) ; Uncomment and it will fail due to Radeon software which put the detected game screen on top

InitSprite()
OpenWindow(0, 0, 0, Width/DesktopResolutionX(), Height/DesktopResolutionY(), "Test Debug", #PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0)*DesktopResolutionX(), WindowHeight(0)*DesktopResolutionY(), #False, 0, 0, #PB_Screen_WaitSynchronization)
Debug "Test"
InitKeyboard()
Repeat
  Event = WindowEvent()
  ExamineKeyboard()
  Delay(20)
  FlipBuffers()
Until Event = #PB_Event_CloseWindow Or KeyboardPushed(#PB_Key_Escape)
Post Reply