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

Home » U++ Library support » TopWindow&PopUp, TrayIcon » Problems with CursorImage/Popups/Frames on X11
Re: Problems with CursorImage/Popups/Frames on X11 [message #13091 is a reply to message #13090] Mon, 10 December 2007 18:06 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
mrjt wrote on Mon, 10 December 2007 11:37

I've found a possible solution to this:
#define MWM_HINTS_DECORATIONS (1L << 1)
#define PROP_MWM_HINTS_ELEMENTS 5

typedef struct {
  uint32_t  flags;
  uint32_t  functions;
  uint32_t  decorations;
  int32_t   input_mode;
  uint32_t  status;
} MWMHints;
...
		MWMHints mwmhints;
		Atom prop;
		memset(&mwmhints, 0, sizeof(mwmhints));
		prop = XInternAtom(Xdisplay, "_MOTIF_WM_HINTS", false);
		mwmhints.flags = MWM_HINTS_DECORATIONS;
		mwmhints.decorations = 0;
		XChangeProperty(Xdisplay, wnd.GetWindow(), prop, prop, 32, PropModeReplace,
		(unsigned char *) &mwmhints,
		PROP_MWM_HINTS_ELEMENTS);
...
This tells the Window Manager not to add decorations to the window which allows me to add my own without redirecting any events. It uses Motif hints, but these are allegedly supported by most WMs. It certainly works on KDE.


Hm, good find!

Potentially very useful Smile

I guess we should add something like "DecorationLess" to TopWindow?

Mirek
 
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: Painting below your window, not bleeding into your window...
Next Topic: Toolbox inside a TopWindow
Goto Forum:
  


Current Time: Sat Jun 20 19:39:57 GMT+2 2026

Total time taken to generate the page: 0.00577 seconds