[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    [PATCH] making KDE more independent from X11
From:       Holger Schroeder <schroder () kde ! org>
Date:       2003-08-28 16:33:47
[Download RAW message or body]


Hi.

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
defined.

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
platforms.

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
    now.
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
    now.
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:

kdelibs:

libkscreensaver: i don't need screensavers under qtonly

kdebase:

kconfig
kcontrol
kdesktop
kdesu
kdm
khotkeys
kicker
klipper
kpager
ksmserver
kstart
ksysguard
ksystraycmd
kwin
kxkb
nsplugins

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 
  kapp->installX11EventHandler.
- 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.

Holger




["kdelibs-0308282.diff.bz2" (application/x-bzip2)]
["kdebase-0308282.diff.bz2" (application/x-bzip2)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic