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 » Community » Coffee corner » U++ bug (freezed screen) related to Dual Display
Re: U++ bug (freezed screen) related to Dual Display [message #60636 is a reply to message #60621] Sun, 16 June 2024 19:39 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
Well, adding / removing monitor while app is running leads me here:

CtrlCore/GtkWnd.cpp:221

Rect Ctrl::GetVirtualWorkArea()
{
	GuiLock __;
	static Rect r;
	if(r.right == 0) {
		r = GetPrimaryWorkArea();
		Array<Rect> rc;
		GetWorkArea(rc);
		for(int i = 0; i < rc.GetCount(); i++)
			r |= rc[i];
	}
	return r;
}

Rect Ctrl::GetVirtualScreenArea()
{
	GuiLock __;
	static Rect r;
	if(r.right == 0) {
		gint x, y, width, height;
		gdk_window_get_geometry(gdk_screen_get_root_window(gdk_screen_get_default()),
	                            &x, &y, &width, &height);
	    r = SCL(x, y, width, height);
	}
	return r;
}


- we only load geometry once

pls try to replace it with

Rect Ctrl::GetVirtualWorkArea()
{
	GuiLock __;
	Rect r;
		r = GetPrimaryWorkArea();
		Array<Rect> rc;
		GetWorkArea(rc);
		for(int i = 0; i < rc.GetCount(); i++)
			r |= rc[i];
	return r;
}

Rect Ctrl::GetVirtualScreenArea()
{
	GuiLock __;
	Rect r;
		gint x, y, width, height;
		gdk_window_get_geometry(gdk_screen_get_root_window(gdk_screen_get_default()),
	                            &x, &y, &width, &height);
	    r = SCL(x, y, width, height);
	return r;
}

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Has anyone used CUDA with UPP?
Next Topic: Mold - Alternative Linker on Linux
Goto Forum:
  


Current Time: Mon Jun 16 22:05:12 CEST 2025

Total time taken to generate the page: 0.04398 seconds