LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 05-10-2017, 01:42 AM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
Give X11 application name to a tiny programm?


Hello,

I have here a small code that displays a tiny clock on X11.

However, xfce panel tells me :
"Untitled".

Which xlib function gives it an application name ?

tiny educational example of x11 app:
https://github.com/spartrekus/xnmess...1-tiny-message
 
Old 05-10-2017, 07:52 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,976

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Some ideas.

https://superuser.com/questions/2279...title-in-linux

https://tronche.com/gui/x/xlib/ICC/c...StoreName.html
 
1 members found this post helpful.
Old 05-11-2017, 02:29 AM   #3
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255

Awesome!! Many thanks Jefro !!
Code:
    // Set the window's name
    XStoreName(display, window , "xtinyclock");
 
Old 05-11-2017, 05:58 AM   #4
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Hi Jefro,

would you eventually know how to start my x11 application (tiny clock) to the geometry location -0-0 ?

I might search for WIDTH/HEIGHT of x11 screen=?

Code:
   s = DefaultScreen(d);
   w = XCreateSimpleWindow(d, RootWindow(d, s), 0, 0, WINWIDTH , 20, 1, BlackPixel(d, s), WhitePixel(d, s));
   // Set the window's name
   XStoreName( d , w , "nxclock");
   XSelectInput(d, w, ExposureMask | KeyPressMask);
   XMapWindow(d, w);
 
  


Reply



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
Run application before KDM but after X11 IM baack! Linux - Software 3 03-31-2010 10:05 AM
How window in programm can be resized by another programm. rexStart Programming 1 09-23-2008 02:47 AM
X11 apply transparancy to an application Oxagast Linux - Software 4 10-08-2006 05:01 PM
Sneaking an application under X11 kav Linux - Software 4 05-20-2006 11:04 AM
add an programm eto application menu mohit dhawan Linux - Newbie 3 05-04-2005 11:58 PM

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

All times are GMT -5. The time now is 04:32 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