📄 67116
字号:
Path: cantaloupe.srv.cs.cmu.edu!magnesium.club.cc.cmu.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!europa.eng.gtefsd.com!howland.reston.ans.net!ira.uka.de!math.fu-berlin.de!cs.tu-berlin.de!athene!badingFrom: bading@cs.tu-berlin.de (Tobias 'Doping' Bading)Newsgroups: comp.windows.xSubject: Re: Forcing a window manager to accept specific coordinates for a windowDate: 21 Apr 1993 11:49:41 GMTOrganization: Technical University of Berlin, GermanyLines: 30Message-ID: <BADING.93Apr21134939@athene.cs.tu-berlin.de>References: <C5r25y.HFz@cs.columbia.edu>NNTP-Posting-Host: athene.cs.tu-berlin.deMime-Version: 1.0Content-Type: text/plain; charset=iso-8859-1Content-Transfer-Encoding: 8bitIn-reply-to: ethan@cs.columbia.edu's message of Mon, 19 Apr 1993 21:25:08 GMTtry this after XCreateWindow:-----------------------------#include <X11/Xutil.h>Display display;Window window;{ XSizeHints *xsizehints = XAllocSizeHints (); xsizehints->flags = USPosition | USSize; /* or = PPosition | PSize */ xsizehints->x = 42; xsizehints->y = 42; xsizehints->width = 100; xsizehints->height = 100; XSetWMNormalHints (display, window, xsizehints); XFree (xsizehints);}These hints tell the window manager that the position and size of the windoware specified by the users and that the window manager should accept thesevalues. If you use xsizehints->flags = PPosition | PSize, this tells the windowmanager that the values are prefered values of the program, not the user.I don't know a window manager that doesn't place the window like you prefer ifyou specify the position and size like above.Greetings from Berlin,Tobias (bading@cs.tu-berlin.de)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -