De visuelle forskelle mellem GNOME- og KDE-skrivebordsmiljøerne er lette at se, så hvordan er det muligt at køre en app fra den ene til den anden uden problemer? Dagens SuperUser Q & A-indlæg har svaret.

Dagens Spørgsmål & Svar session kommer til os med venlig hilsen af ​​SuperUser-en underafdeling af Stack Exchange, en community-driven gruppe af Q & A-websteder.

'Shaking Hands' clipart med tilladelse til Clker.com.

Spørgsmålet

SuperUser-læser LeNoob ønsker at vide, hvordan KDE-apps kan køre under GNOME:

If GNOME uses GTK+ and KDE uses Qt, how are KDE applications able to run under GNOME?

Hvad gør det muligt for KDE-apps at løbe glat under GNOME?

Svaret

SuperUser bidragyder grawity har svaret for os:

This is possible because these desktop environments use the same graphics system, X11. All graphical programs only talk the X11 protocol with an X server (usually Xorg), sending commands to draw this or that, and receiving input events (mouse, keyboard, etc.).

Each UI toolkit like GTK or Qt comes in the form of libraries that the graphical program links against. A program written for GNOME will use libgdk and libgtk, and a KDE program will use libQtCore with libQtGui. Both toolkits then simply use the same X11 functions to draw everything in the respective program’s window.

Most modern toolkits, like GTK, Qt, or EFL, perform all drawing themselves, and just send the finished image of the whole window over X11. Older toolkits like Xaw or Motif instead send commands to draw primitives like lines or rectangles, and the X server does all rendering.

The X11 protocol also covers window management, so each desktop environment will have a “window manager” program which draws window frames (“decorations”), allows you to move and resize windows, and so on. Modern “compositing” window managers actually take over Xorg’s job of composing all windows onto the final screen image, allowing things like shadows or effects to be added.

At binde til det samme grafiksystem for nem "kompatibilitet" er en fantastisk ting, og fantastisk, når du vil have alle dine yndlingsprogrammer kørende under det samme skrivebordsmiljø!


Har du noget at tilføje til forklaringen? Ik anyik notk not notikkkkkk not not noting notkfikik not any anyik any for anyik notikikinging not Vil du læse flere svar fra andre tech-savvy Stack Exchange brugere? Tjek den fulde diskussionstråd her.

Top Tips:
Kommentarer: