diff --git a/src/conio/x_cio.c b/src/conio/x_cio.c index c46587208741cace1130f0b3690d60228efcdd8a..30d6acbc6338cbcc6592c23c8cbe8238f62e2383 100644 --- a/src/conio/x_cio.c +++ b/src/conio/x_cio.c @@ -324,6 +324,14 @@ int x_init(void) xp_dlclose(dl); return(-1); } + if((x11.XAllocWMHints=xp_dlsym(dl,XAllocWMHints))==NULL) { + xp_dlclose(dl); + return(-1); + } + if((x11.XSetWMProperties=xp_dlsym(dl,XSetWMProperties))==NULL) { + xp_dlclose(dl); + return(-1); + } if(sem_init(&pastebuf_set, 0, 0)) return(-1); diff --git a/src/conio/x_events.c b/src/conio/x_events.c index e7a1b9b33b9ddfcd5ae6c57f296e8ea00bab6a85..81d0e954fccdf3946e6140bc8f468c49cea4d917 100644 --- a/src/conio/x_events.c +++ b/src/conio/x_events.c @@ -195,6 +195,7 @@ static int init_window() XColor color; int i; XWindowAttributes attr; + XWMHints *wmhints; dpy = x11.XOpenDisplay(NULL); if (dpy == NULL) { @@ -210,6 +211,14 @@ static int init_window() win = x11.XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 1, 1, 2, black, black); + wmhints=x11.XAllocWMHints(); + if(wmhints) { + wmhints->initial_state=NormalState; + wmhints->flags = (StateHint | IconPixmapHint | IconMaskHint | InputHint); + wmhints->input = True; + x11.XSetWMProperties(dpy, win, NULL, NULL, 0, 0, NULL, wmhints, NULL); + } + gcv.function = GXcopy; gcv.foreground = white; gcv.background = black; diff --git a/src/conio/x_events.h b/src/conio/x_events.h index 49cfd4cc04ba6f16bc9de7ddf4fa04acb1c0a1e9..c19e1310e03a66150cefc982f924cf2b596e66b5 100644 --- a/src/conio/x_events.h +++ b/src/conio/x_events.h @@ -78,6 +78,8 @@ struct x11 { int (*XSetIconName) (Display*, Window, _Xconst char *); int (*XSynchronize) (Display*, Bool); Status (*XGetWindowAttributes) (Display*,Window,XWindowAttributes*); + XWMHints* (*XAllocWMHints) (void); + void (*XSetWMProperties) (Display*, Window, XTextProperty*, XTextProperty*, char**, int, XSizeHints*, XWMHints*, XClassHint*); };