Home » Developing U++ » U++ Developers corner » Eye Care example topmost not working. (How to set a window to stay at the top of the z-order)
Eye Care example topmost not working. [message #44061] |
Sat, 20 December 2014 20:30  |
rainbowsally
Messages: 29 Registered: December 2014
|
Promising Member |
|
|
The TopMost(bool) function sets or resets the x11 attribute for a window that can stay on top of all the others.
Here's the fix for the Eye Care example for linux folks.
void EyeCare::Sync()
{
#ifdef PLATFORM_WIN32
ExStyle(config.topmost ? GetExStyle() | WS_EX_TOPMOST
: GetExStyle() & ~WS_EX_TOPMOST);
// -rs add these two lines
#else
config.topmost ? TopMost(true) : TopMost(false);
#endif
trayicon.Icon(ignore ? EyeCareImg::off() : EyeCareImg::icon());
if(config.hideicon)
ignore = false;
trayicon.Show(!config.hideicon);
Restart();
}
|
|
|
Goto Forum:
Current Time: Sat Apr 26 18:48:35 CEST 2025
Total time taken to generate the page: 0.00922 seconds
|