U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » Menus&Toolbars » [not a bug] Menu isn`t drawn. NOGTK. FreeBSD/Fluxbox
Re: [bug?] Menu isn`t drawn. NOGTK. FreeBSD/Fluxbox [message #18853 is a reply to message #18288] Tue, 28 October 2008 17:15 Go to previous messageGo to previous message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Finally I debugged deep into CtrlCore and discovered that dropdown popups and menus are drawn but they are drawn BEHIND actual active window.

I tried some dirty hack to test if it can be corrected and it worked. Partially. Dropdown menus work properly, menus are drawn properly too but disappear on mouse movement inside them.

My dirty little test patch:
CtrlCore/X11Wnd.cpp

was:
void Ctrl::PopUp(Ctrl *owner, bool savebits, bool activate, bool, bool)
{
	LLOG("POPUP: " << UPP::Name(this));
	Ctrl *q = owner ? owner->GetTopCtrl() : GetActiveCtrl();
	ignoretakefocus = true;
	Create(q, true, savebits);
	if(activate) {
		q->StartPopupGrab();
		popupgrab = true;
	}
	if(top) popup = true;
	WndShow(visible);
	
	if(activate && IsEnabled())
		SetFocus();
	if(top) top->owner = owner;
	StateH(OPEN);
}


now:
void Ctrl::PopUp(Ctrl *owner, bool savebits, bool activate, bool, bool)
{
	LLOG("POPUP: " << UPP::Name(this));
	Ctrl *q = owner ? owner->GetTopCtrl() : GetActiveCtrl();
	ignoretakefocus = true;
	Create(q, true, savebits);
	if(activate) {
		q->StartPopupGrab();
		popupgrab = true;
	}
	if(top) popup = true;
	WndShow(visible);
	
	SetWndFocus();
	XRaiseWindow(Xdisplay, top->window);

	if(activate && IsEnabled())
		SetFocus();
	if(top) top->owner = owner;
	StateH(OPEN);
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to set the font face of menubar and its submenu
Next Topic: images as menu
Goto Forum:
  


Current Time: Fri Jun 19 11:01:27 GMT+2 2026

Total time taken to generate the page: 0.00603 seconds