List Info

Thread: Create a window without Minimize, Maximize, Restore buttons




Create a window without Minimize, Maximize, Restore buttons
user name
2007-02-01 20:22:23
Dear all,
To whom who have worked with X11 programming, I have been
stuck in small
question and I cannot resolved it yet. Please give me a help
if you have
dealt with this problem before.

The question is: how to create a window (using X11 lib)
without Minimize,
Maximize, Restore, buttons at the top-right of the created
window; without
"X" icon at the top-left of the created window?

Thanks indeed,

woapxp 
-- 
View this message in context: htt
p://www.nabble.com/Create-a-window-without-Minimize%2C-Maxim
ize%2C-Restore-buttons-tf3158673.html#a8760725
Sent from the openbsd dev - x11 mailing list archive at
Nabble.com.


Re: Create a window without Minimize, Maximize, Restore buttons
user name
2007-02-02 01:04:59
woapxp wrote:
> Dear all,
> To whom who have worked with X11 programming, I have
been stuck in small
> question and I cannot resolved it yet. Please give me a
help if you have
> dealt with this problem before.
> 
> The question is: how to create a window (using X11 lib)
without Minimize,
> Maximize, Restore, buttons at the top-right of the
created window; without
> "X" icon at the top-left of the created
window?
> 

This is done via the window manager hints. See the
XAllocSizeHints()
manual page and the related functions.

Also note that these are only hints to the window manager.
Some of them
will obey the hints, other wont.

Most higher level toolkits (Gtk+, Qt, ...) have their own
functions to
manage the WM Hints and in this case you should avoid using
Xlib directly.
-- 
Matthieu Herrb


Re: Create a window without Minimize, Maximize, Restore buttons
user name
2007-02-02 01:52:42
Dear Matthieu Herrb, 

Thanks for your support. But I still cannot find out the 
way to result it.
The way of my approach can be described as follow: 
1. Create a simple window

win = XCreateSimpleWindow(display, 
RootWindow(display,screen), 
x, y, width, height,									
border_width,
BlackPixel(display,screen), 
WhitePixel(display,screen));

2. Set value for XSizeHints variable: 

XSizeHints size_hints; 
memset(&Size_hints,0,sizeof(XSizeHints);
       size_hints.flags 			= PPosition | PSize |
PMinSize;											

	size_hints.x 					= x; 
	size_hints.y 					= y; 
	size_hints.width 			= width; 
	size_hints.height 		= height; 
	size_hints.min_width 	= some_val; 
	size_hints.min_height = some_val;		

3. Set standard properties for the window: 

XSetStandardProperties(display, win, window_name,
NULL,NULL, argv, argc,&size_hints);


I just can do that by using XSizeHints. I cannot find more
information about
the detail of the window like Minimize, Maximize, Restore
buttons. 
What is wrong in my approach of creating a required window?
Please give me
more your opinion.

Thanks and regards, 

woapxp 


Matthieu Herrb wrote:
> 
> woapxp wrote:
>> Dear all,
>> To whom who have worked with X11 programming, I
have been stuck in small
>> question and I cannot resolved it yet. Please give
me a help if you have
>> dealt with this problem before.
>> 
>> The question is: how to create a window (using X11
lib) without Minimize,
>> Maximize, Restore, buttons at the top-right of the
created window;
>> without
>> "X" icon at the top-left of the created
window?
>> 
> 
> This is done via the window manager hints. See the
XAllocSizeHints()
> manual page and the related functions.
> 
> Also note that these are only hints to the window
manager. Some of them
> will obey the hints, other wont.
> 
> Most higher level toolkits (Gtk+, Qt, ...) have their
own functions to
> manage the WM Hints and in this case you should avoid
using Xlib directly.
> -- 
> Matthieu Herrb
> 
> 
> 

-- 
View this message in context: htt
p://www.nabble.com/Create-a-window-without-Minimize%2C-Maxim
ize%2C-Restore-buttons-tf3158673.html#a8762969
Sent from the openbsd dev - x11 mailing list archive at
Nabble.com.


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )