Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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)
Re: Eye Care example topmost not working. [message #44093 is a reply to message #44061] Wed, 24 December 2014 12:25 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
rainbowsally wrote on Sat, 20 December 2014 20:30
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();
}




Thanks for reporting. The problem was that by the time that example was created, TopWindow did not have TopMost method yet. Now whole thing was replaced with TopMost(config.topmost).
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: redmine inaccessible
Next Topic: Cross compiling with mingw
Goto Forum:
  


Current Time: Thu Aug 21 19:09:47 CEST 2025

Total time taken to generate the page: 0.05588 seconds