|
|
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();
}
|
|
|
|
|
Re: Eye Care example topmost not working. [message #46263 is a reply to message #44110] |
Sun, 03 April 2016 11:33 |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
rainbowsally wrote on Thu, 25 December 2014 05:24mirek wrote on Wed, 24 December 2014 12:25
<snip>
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).
How long will it be before the eye care 'corrected' example will be included in the upp downloads.
"TopWindow did not have TopMost method yet"
"Now whole thing was replaced with TopMost(config.topmost)."
Is this how the upp code will handle topmost?
[Updated on: Sun, 03 April 2016 11:39] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Dec 06 15:30:05 CET 2024
Total time taken to generate the page: 0.02402 seconds
|
|
|