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 » U++ Library support » U++ Library : Other (not classified elsewhere) » [BUG & Patch] TopWindow::CenterRect under X11 may lead to crash!!!
[BUG & Patch] TopWindow::CenterRect under X11 may lead to crash!!! [message #40635] Sun, 25 August 2013 01:26 Go to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

I have noticed that method TopWindow::CenterRect can creat window outside screen. This behaviour can lead to crash on some windows managers like Kwin.

What we need to do is omit the code that is calculating absolut center position if new window is partially or fully outside screen. So the new "if" look like this:
if (p.x <= wr.Width() && p.y <= wr.Height()) {
    // Find the absolut position of new window
    // ....
}


I enclosed corrected source file (CtrlCore/X11Top.cpp).

Sincerley,
Klugier
  • Attachment: X11Top.cpp
    (Size: 13.28KB, Downloaded 316 times)


U++ - one framework to rule them all.

[Updated on: Sat, 31 August 2013 00:31]

Report message to a moderator

Re: [BUG & Patch] TopWindow::CenterRect under X11 may lead to crash!!! [message #40647 is a reply to message #40635] Sun, 25 August 2013 11:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks, applied.

Mirek
Re: [BUG & Patch] TopWindow::CenterRect under X11 may lead to crash!!! [message #40675 is a reply to message #40647] Fri, 30 August 2013 13:27 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

It seems that new ctrl center algorithm (under X11) may crash when we use empty workspace (Multi monitor mode).

I made one cosmetic change. Now, TopWindow::CenterRect should be 99% safe under X11.

Sincerely,
Klugier
  • Attachment: X11Top.cpp
    (Size: 13.29KB, Downloaded 252 times)


U++ - one framework to rule them all.
Re: [BUG & Patch] TopWindow::CenterRect under X11 may lead to crash!!! [message #40679 is a reply to message #40675] Sun, 01 September 2013 18:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Applied.

Mirek
Re: [BUG & Patch] TopWindow::CenterRect under X11 may lead to crash!!! [message #40685 is a reply to message #40679] Mon, 02 September 2013 01:04 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Mirek,

Thanks for update. The last bug from this branch concerns windows deformation. The recognision algorithm isn't perfect on X11 as you can see. Let's expand our algorithm! Hear is new line (CtrlCore/X11Top.cpp - 242):

if (p.x + sz.cx <= wr.Width() && p.y + sz.cy <= wr.Height()) {


I enclose expanded source file.

P.S.
It is definitely end of improvement to TopWindow::CenterRect method under X11.

Sincerely,
Klugier
  • Attachment: X11Top.cpp
    (Size: 13.38KB, Downloaded 289 times)


U++ - one framework to rule them all.
Re: [BUG & Patch] TopWindow::CenterRect under X11 may lead to crash!!! [message #40692 is a reply to message #40685] Tue, 03 September 2013 20:06 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Applied as well...

Mirek
Previous Topic: WString0::Free() crashing
Next Topic: Some MSCx66 warnings and fixes
Goto Forum:
  


Current Time: Thu Mar 28 19:34:29 CET 2024

Total time taken to generate the page: 0.01543 seconds