* add fluxbox

This commit is contained in:
Alexander Baldeck 2020-01-06 20:06:04 +01:00
parent 91779be54c
commit db36883c6b
4 changed files with 141 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From a5f3eb0d9987d4c0120da3431b73fb523ac0ecba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20L=C3=BCbking?= <thomas.luebking@gmail.com>
Date: Thu, 30 Jun 2016 15:20:51 +0200
Subject: [PATCH] do not leave stale oplock behind
deiconify'ing a client on a different workspace left an oplock by a
shortcut return, turning the client semi- to inaccessible
BUG: 1010
---
src/Window.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/Window.cc b/src/Window.cc
index 51f5d441..0aa4ec62 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1430,8 +1430,10 @@ void FluxboxWindow::deiconify(bool do_raise) {
}
}
- if (m_workspace_number != screen().currentWorkspaceID())
+ if (m_workspace_number != screen().currentWorkspaceID()) {
+ oplock = false;
return;
+ }
show();

View File

@ -0,0 +1,57 @@
From 6346368b58e054174075f615a836ff3bd9c9f823 Mon Sep 17 00:00:00 2001
From: foobar0815 <atalanta.bergamo@gmail.com>
Date: Sun, 1 Mar 2015 20:04:10 +0100
Subject: [PATCH] send ConfigureNotify using root coordinates
---
src/SystemTray.cc | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/src/SystemTray.cc b/src/SystemTray.cc
index 98115087..c908f3e7 100644
--- a/src/SystemTray.cc
+++ b/src/SystemTray.cc
@@ -45,6 +45,30 @@ using std::endl;
using std::hex;
using std::dec;
+void getScreenCoordinates(Window win, int x, int y, int &screen_x, int &screen_y) {
+ XWindowAttributes attr;
+ if (XGetWindowAttributes(FbTk::App::instance()->display(), win, &attr) == 0) {
+ return;
+ }
+
+ Window child_win; // not used
+ Window parent_win; // not used
+ Window root_win = 0;
+ Window* child_windows; // not used
+ unsigned int num_child_windows; // not used
+ XQueryTree(FbTk::App::instance()->display(), win,
+ &root_win,
+ &parent_win,
+ &child_windows, &num_child_windows);
+ if (child_windows != 0) {
+ XFree(child_windows);
+ }
+ XTranslateCoordinates(FbTk::App::instance()->display(),
+ parent_win, root_win,
+ x, y,
+ &screen_x, &screen_y, &child_win);
+}
+
/// helper class for tray windows, so we dont call XDestroyWindow
class TrayWindow: public FbTk::FbWindow {
public:
@@ -470,9 +494,11 @@ void SystemTray::rearrangeClients() {
next_x += h_rot0+bw;
translateCoords(orientation(), x, y, w_rot0, h_rot0);
translatePosition(orientation(), x, y, h_rot0, h_rot0, 0);
+ int screen_x = 0, screen_y = 0;
+ getScreenCoordinates((*client_it)->window(), (*client_it)->x(), (*client_it)->y(), screen_x, screen_y);
(*client_it)->moveResize(x, y, h_rot0, h_rot0);
- (*client_it)->sendConfigureNotify(x, y, h_rot0, h_rot0);
+ (*client_it)->sendConfigureNotify(screen_x, screen_y, h_rot0, h_rot0);
}
}

49
fluxbox/PKGBUILD Normal file
View File

@ -0,0 +1,49 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgname=fluxbox
pkgver=1.3.7
pkgrel=5
pkgdesc="A lightweight and highly-configurable window manager"
arch=(x86_64 powerpc64le)
url="http://www.fluxbox.org"
license=('MIT')
depends=('libxft' 'libxpm' 'libxinerama' 'libxrandr' 'imlib2' 'fribidi')
makedepends=('xorgproto')
optdepends=('xorg-xmessage: for using the fbsetbg and fluxbox-generate_menu utilities')
options=('!makeflags')
source=("https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.xz"
'0001-do-not-leave-stale-oplock-behind.patch'
'0002-send-ConfigureNotify-using-root-coordinates.patch'
'fluxbox.desktop')
sha256sums=('fc8c75fe94c54ed5a5dd3fd4a752109f8949d6df67a48e5b11a261403c382ec0'
'9c486f454f46a51cb1b7cb65de812faa12e2a1cce13785c349b488f051a01470'
'66f64c67e5c99b2c6bf139ba2f7a3ff9fcb613c5b49b0038c42cc55cc00153dc'
'2148a90aca653b596e9632264dbdbd8c7e673d732e4b04eee66a8ac1e68b3c5d')
prepare() {
cd ${pkgname}-${pkgver}
patch -Np1 < ../0001-do-not-leave-stale-oplock-behind.patch
patch -Np1 < ../0002-send-ConfigureNotify-using-root-coordinates.patch
}
build() {
cd ${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--enable-imlib2 \
--enable-nls \
--enable-xft \
--enable-xinerama
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
install -D -m644 "${srcdir}/fluxbox.desktop" "${pkgdir}/usr/share/xsessions/fluxbox.desktop"
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

6
fluxbox/fluxbox.desktop Normal file
View File

@ -0,0 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/usr/bin/startfluxbox
TryExec=/usr/bin/startfluxbox
Name=fluxbox