LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 02-28-2024, 05:48 AM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Just converted some tricky xorg code to run under gtk3


Background: Some time ago I wrote a small package to provide some furniture for a minimalist desktop. At first it was just a buttonbar to launch my favorite applications, but then I added a trashcan and a disk mounting tool similar to the one that Damn Small Linux used to have. In fact the buttonbar is the only part of the suite that I use.

I wanted to make these tools run in the window manager's dock, so I asked around for advice on how to do it. A kind stranger sent me a little program he had written for a docked clock and I abstracted the necessary code from that. It used libX11 and gdk functions and I didn't understand a word of it, but it worked, which was all I cared about.

But when I tried to upgrade the package from gtk2 to gtk3, the compiler went on strike and spat out complaints about errors in the header files. Which was nonsense of course; Slackware doesn't contain faulty software. So I visually compared the gdk2 and gdk3 headers and found that gdk3 no longer includes one of the macros I was using. To replace that macro, I actually had to learn something about X.

I learned that an X display is not the same thing as a gdk display (who knew?), but that there are gdk functions for converting one into another, which is what the bad macro should have done. And now the docking code works again.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I just converted to Fedora 7 georgestancliffe LinuxQuestions.org Member Intro 1 11-28-2007 10:20 PM
I just converted to Mepis! tnelson42345 MEPIS 7 12-21-2006 05:43 PM
Xorg tricky question festino114 Linux - General 4 06-29-2005 02:51 PM
Scepticism no more - I just might be converted cranky General 12 10-20-2004 10:11 PM
Just converted to Linux - X keeps locking paulsh2k4 Linux - Software 11 09-14-2004 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

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