Unable to move xlib window until app focus is changed -


that I'm making a single xlib window with the related code when I try to move the window, the cursor briefly The grab catches in the cursor and I am unable to drag the window. However, if I change the focus on any other app, then come back to my app, I am able to drag the window. I'm new to xlib, and I do not understand why I can pull the window after creation?

  ms_display = XOpenDisplay (NULL); Int screen = default squirrel (ms_display); Window Root Window = Root Window (MS-DicePlace, Screen); XSetWindowAttributes windowAttrib; WindowAttrib.background_pixel = 0; WindowAttrib.border_pixel = 0; WindowAttrib.colormap = XCreateColormap (MS-DicePlug, Root Window, M_Visual, Alokone); WindowAttrib.event_mask = ConfigurationCam_cache | Keypress mask | KeyReleaseMask | ButtonPressMask | PointerMotionMask | Focus Changemask | EnterWindowMask | LeaveWindowMask; Int width = m_displayInfo.m_windowWidth; Int height = m_displayInfo.m_windowHeight; Unsigned long mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; Ms_window = XCreateWindow (ms_display, rootwindow, 0,0, width, height, 0, pVisInfo- & gt; depth, input output, pVisInfo-> scene, mask, and window attety); XMapWindow (MS_Display, MS_Window); XFlush (ms_display); XSizeHints Size Hunt; SizeHintskx = (Chaudhaiofskrin (Skrinofdisple (Ms_disple screen)) - width / 2; SizeHintsky = (height Ofskrin (Skrinof Disisl (Ms_disple screen)) - height) / 2; size. Width = width; shaped hook. Height = height; SizeHints.flags = USPosition | Us Size; XSetWMSizeHints (ms_display, ms_window, & amp; sizeHints, XInternAtom (ms_display, "WM_SIZE_HINTS", false)) XMoveResizeWindow (ms_display, ms_window, sizeHints.x, sizeHints.y, Width, height);    

I took part in a similar situation Where there will be a newly created window focus, mouse clicks or keyboard input until I called XSetWMHints (), even with completely empty structure, for example. It was the amount of work:

  Aksdblyuemacinnet xwmh; Xwmh.flags = 0; Aksstimmhinsts (M_ Disple, M_vindo, and Aksdblyuemac);   

strange, but my problem went resolved

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -