Mercurial > core / lisp/lib/gui/wm/pkg.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
aac665e2f5bf
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
1 ;;; lib/gui/wm.lisp --- Window Management Systems 5 ;; The two Window Systems worth mentiong are X11 and Wayland. We are 6 ;; interested in both, for different reasons. 8 ;; X11 is for general-purpose, personal computing. It's the standard 9 ;; everyone relies on and whenever we're running GUIs we're assuming 12 ;; Wayland is for domain-specific user applications. It's a modular 13 ;; protocol which follows a different design and philosophy than 14 ;; X11. It is not feature complete, but it has a high level of 15 ;; community support. In the right conditions, Wayland apps can be 16 ;; smaller and faster than the equivalent X11-based implementation 17 ;; [uncited]. e.g. kiosks. 19 ;; No matter what, we have no intention of running X11 and Wayland in 20 ;; parallel/embedded using things like XWayland. RTFM - it should be 21 ;; clear which window management system an app is built for. If not, 22 ;; it's a bug (squash it!). 28 (defpackage :gui/wm/wl 29 (:use :cl :std :gui/core :wayflan) 34 (defpackage :gui/wm/x11 36 (:shadowing-import-from :std/type :array-index) 37 (:use :cl :std :gui/core :xlib) 40 (defvar *default-wm* :x11) 42 (defun wm-package (&optional wm) 43 "Return the WM package, either ':x11' for X11 or ':wl' for 44 Wayland. When no WM is provided, we interrogate the host to find out 45 which WM is currently running, and as a last resort falls back to 48 ((or :x11 :wl) (find-package wm)) 49 ((nil) (find-package *default-wm*)) 50 (t (error "invalid wm type"))))