[PATCH] making KDE more independent from X11

Holger Schroeder schroder at kde.org
Thu Aug 28 17:33:47 BST 2003


please look at the patches and give me some feedback. if you are in n7y and 
want to see it running, simply drop by...

This is a description of what i changed in kde head to make it
less dependent on X11.

first of all: nothing is changed in the case when only Q_WS_X11 is

i added a configure check --enable-qtonly. when that one is set,
it sets a define in config.h, its name is K_WS_QTONLY. dependent on
that define, X-dependent stuff is deactivated on X too. this is good for
testing purposes, as you can strip out X-dependent stuff step by step,
although you are still working on X. so you don't have to work on another
qt library, such as embedded, mac, or windows, but most of this work
can be done on x11.

there were a lot of 
#ifndef Q_WS_QWS
in the sources, i changed most of them to
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
as the stuff in the defines is used on x11 only, and not on the other

for the QTONLY case i got rid of these classes:

KRootPixmap : it makes transparency possible for konsole.
KStartupInfo : it sets some startup informations so that a busy cursor
    can be displayed. it is quite x-dependent, so i deactivated it for
KWinModule : used for managing multiple desktops and getting information
    about the desktop. there is of course some functionality missing in
    the qtonly case, but i will fix that later, as it is not so important
netwm: contains NETRootInfo and friends, all this is quite dependent on
    X, it is used to query for example the screen number or the size
    of a window.
KXMessages: used to send out messages to other windows/programs in a
    X-dependent way.
KXErrorHandler: offers a possibility to query for x errors.

for the qtonly case i deactivated the following subdirs from compiling,
as they contain too much x-dependent stuff to fix now or as they don't make
sense on qtonly:


libkscreensaver: i don't need screensavers under qtonly



so in these subdirs there could still be x-dependencies.

the other remaining dependencies are in dcop and here:

kdecore/kapplication.cpp:114:#include <X11/Xlib.h> // schrode
kdecore/kapplication.cpp:115:#include <X11/Xutil.h> // schrode
kdecore/kapplication.cpp:116:#include <X11/Xatom.h> // schrode
kdecore/kapplication.cpp:117:#include <X11/SM/SMlib.h> // schrode
kdecore/kglobalaccel_x11.cpp:23:#include <X11/X.h>
kdecore/kglobalaccel_x11.cpp:24:#include <X11/Xlib.h>
kdecore/kglobalaccel_x11.cpp:25:#include <X11/keysym.h>
kdecore/kkeynative_x11.cpp:36:#include <X11/X.h>
kdecore/kkeynative_x11.cpp:37:#include <X11/Xlib.h>
kdecore/kkeynative_x11.cpp:38:#include <X11/Xutil.h>
kdecore/kkeynative_x11.cpp:39:#include <X11/keysymdef.h>
kdecore/kkeyserver_x11.cpp:19:#include <X11/X.h>
kdecore/kkeyserver_x11.cpp:20:#include <X11/Xlib.h>
kdecore/kkeyserver_x11.cpp:21:#include <X11/Xutil.h>
kdecore/kkeyserver_x11.cpp:22:#include <X11/keysymdef.h>
kdecore/kmanagerselection.cpp:54:#include <X11/Xatom.h>
kinit/kinit.cpp:72:#include <X11/Xlib.h>
kinit/kinit.cpp:73:#include <X11/Xatom.h>

remaining bugs in the qtonly case:

- nothing happens if you left click on icons in konqueror in  
  filemanager mode, probably because of a deactivated 
- kmenubars in programs don't have the correct width at startup,
  probably because of some deactivated netwm stuff.

so we only have to fix kdeinit, dcop, the keyboard handling
and some stuff left in kapplication and we will be able to run
kde 3.2 on non-x11 platforms too...

because i didn't understand this autoconf/automake stuff yet to
an extend that it works for me, you have to manipulate the file
kdelibs/khtml/Makefile.am manually and delete the subdirs
java and ecma from it manually. (help is welcome)

attached are the patches for kdelibs and kdebase. please look over them and 
give some comments.

i would like to apply this today or tomorrow, if there are no objections.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-0308282.diff.bz2
Type: application/x-bzip2
Size: 20806 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030828/a7e23ced/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdebase-0308282.diff.bz2
Type: application/x-bzip2
Size: 11008 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030828/a7e23ced/attachment-0001.bin>

More information about the kde-core-devel mailing list