LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-25-2004, 04:13 PM   #1
tilo
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Rep: Reputation: 0
xlib & window titlebar?!?!?!


hi there,

i have some problems with xlib windows. i open a window with the following call ...

Code:
	...
	XSetWindowAttributes attr;
	unsigned long valuemask = 0;
	XGCValues values;
	attr.save_under        = TRUE;
	attr.override_redirect = FALSE;
	
	if (!parentwin) parentwin = RootWindow(x11_display, x11_screen);
		
	win = XCreateWindow(x11_display, parentwin, 0,0,500, 500, 0, CopyFromParent, CopyFromParent, CopyFromParent, CWSaveUnder|CWOverrideRedirect, &attr);

	gc = XCreateGC(x11_display, win, valuemask, &values);

	XSync(x11_display, 0);
	XFlush(x11_display);
	...
that's basicly all what i do ... with that code the window appears on my desktop ... i can resize the window and it works fine ...

BUT ... sometimes (70%) the window has a titlebar and sometimes not ... if the window titlebar is missing i can maximize the window from the popupmenu on the border and then the titlebar does appear also ... i think this is very strange ...

now the questions:

- what can i do to get a more predictable result :-)???

- is there a function anywhere in the xlib where i can maximize the window (so that it is attached to the screen - the popup of the windowmanager has this function, but i cant found a fucntion anywhere in the docs)

- if i open more than one window and i hit the close button ('x') in the window my whole application ends ... is there any chance to catch this event and close only that window :-)

okay ... that's enough for the beginning ...

thanks in advance for all answers ...

tilo

Last edited by tilo; 09-25-2004 at 04:15 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluxbox 0.9.x window titlebar position albatros_la Linux - Software 7 09-26-2004 09:21 AM
Trasparent && Sexy stuff and which window manager??? alekoos Slackware 2 04-30-2004 06:03 PM
Mandrake 10 & OpenOffice (titlebar problem) cb_linus Mandriva 0 03-18-2004 04:42 PM
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified eyalkz Programming 1 03-02-2004 08:22 AM
(how to close X Window) && (Dial up command) jax8 Linux - Newbie 2 02-14-2004 07:47 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration