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 #13090 is a reply to message #13024] Mon, 10 December 2007 17:37 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
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.
 
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:55 GMT+2 2026

Total time taken to generate the page: 0.00552 seconds