LinuxQuestions.org
Review your favorite Linux distribution.
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 03-09-2005, 09:12 AM   #1
SteQve
Member
 
Registered: Mar 2005
Location: Sweden
Distribution: Suse
Posts: 39

Rep: Reputation: 15
xlib and child windows (repaint)


When I create a child window with xcreatewindow, is there any message sent to that window that says it should repaint?

I have a main-loop, and in there i'd like to be notified when its time to repaint main window, childs and so on.

In windows (well...I'm from "that" side) you receive a WM_PAINT when you should repaint window. I cannot find a notify-message that fit. Probably I use Xlib in a wrong way...
 
Old 03-09-2005, 09:21 AM   #2
DaFrawg
LQ Newbie
 
Registered: Jun 2004
Location: The Netherlands
Distribution: Slackware 10.1, Debian Sarge
Posts: 28

Rep: Reputation: 15
I'm trying to switch from (the crappy) Win32 to Linux too, but I think I have a longer way ahead of me than you

Quoting from this site:
Quote:
To repaint the window and its background, use XClearWindow. Setting the border or changing the background such that the border tile origin changes causes the border to be repainted.
In Windows, this would be equivalent to sending a WM_PAINT (and a WM_NCPAINT) to the window. I have no idea to choose wether the background should be cleared or not (in Windows you just say TRUE or FALSE when you get WM_ERASEBACKGROUND). I'm also not sure if it will repaint the child windows, but I guess the page I referred to can help you at least a bit.
 
Old 03-09-2005, 11:17 AM   #3
SteQve
Member
 
Registered: Mar 2005
Location: Sweden
Distribution: Suse
Posts: 39

Original Poster
Rep: Reputation: 15
Well...it was the VisibilityNotify i was looking for...

Two short (?) questions:

1. How to create a roundrect window? Like the windows on the taskbar?
2. Can I assign any userdata to a Window variable? I'd like to assign every Window object in X with a pointer to a class....possible? In Window you call SetWindowLong(...) and you can set some data...Any eqaul in X?

Thanks in advance =)
 
Old 03-10-2005, 10:18 AM   #4
DaFrawg
LQ Newbie
 
Registered: Jun 2004
Location: The Netherlands
Distribution: Slackware 10.1, Debian Sarge
Posts: 28

Rep: Reputation: 15
No clue. Again, I have no Xlib experience at all. I just googled.
 
Old 03-10-2005, 10:33 AM   #5
SteQve
Member
 
Registered: Mar 2005
Location: Sweden
Distribution: Suse
Posts: 39

Original Poster
Rep: Reputation: 15
maybe there is another forum where I can ask my very "low level" X questions? I sort of don't like mail-lists, and XFree86 doesn't provide any forum...
 
Old 03-10-2005, 11:31 AM   #6
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,578

Rep: Reputation: 127Reputation: 127
You have to use the X shape extension to create a roundrect window
http://m3d.uib.es/grafica2/Mesa-3.1/xdemos/shape.c
 
  


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
How to kill a Child and all its subsequent child process in C shayer009 Programming 3 12-04-2007 12:40 AM
Windows Child games for Linux CoockieRoockie Linux - Software 5 01-27-2005 06:13 PM
Xlib errors, X Windows Problems??? Please help... leeach Linux - Software 2 10-02-2003 06:10 PM
Xlib errors, X Windows Problems??? Please help... leeach General 0 10-02-2003 05:27 PM
Xlib-Windows Manager question amilici Programming 1 09-11-2003 11:49 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration