diff options
author | B. Stack <bgstack15@gmail.com> | 2022-11-09 16:04:18 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-11-09 16:04:18 -0500 |
commit | f183cfec8b565beeafd93f8f8b76a23fa71e78ff (patch) | |
tree | 654464b353c105428b65355a80d1322a2301483c /fluxbox/debian/patches | |
parent | Merge branch 'freefilesync-bump' into 'master' (diff) | |
download | stackrpms-f183cfec8b565beeafd93f8f8b76a23fa71e78ff.tar.gz stackrpms-f183cfec8b565beeafd93f8f8b76a23fa71e78ff.tar.bz2 stackrpms-f183cfec8b565beeafd93f8f8b76a23fa71e78ff.zip |
add fluxbox
Diffstat (limited to 'fluxbox/debian/patches')
-rw-r--r-- | fluxbox/debian/patches/add-clientmachine-if-forwarded.patch | 134 | ||||
-rw-r--r-- | fluxbox/debian/patches/fix-startup-check-fbautostart.patch | 33 | ||||
-rw-r--r-- | fluxbox/debian/patches/fix-xterm-keybinding.patch | 24 | ||||
-rw-r--r-- | fluxbox/debian/patches/series | 3 |
4 files changed, 194 insertions, 0 deletions
diff --git a/fluxbox/debian/patches/add-clientmachine-if-forwarded.patch b/fluxbox/debian/patches/add-clientmachine-if-forwarded.patch new file mode 100644 index 0000000..5191173 --- /dev/null +++ b/fluxbox/debian/patches/add-clientmachine-if-forwarded.patch @@ -0,0 +1,134 @@ +Author: bgstack15 +Date: 2022-11-09 +Version: fluxbox 1.4.0 +Source: original +Summary: Add "(on $CLIENT)" to titlebar for forwarded windows +Message: +Inspired by xfwm4's ability to display the remote host running an X11 window. This fails on xfe which somehow lacks the WM_CLIENT_MACHINE property. +--- a/src/Xutil.cc ++++ b/src/Xutil.cc +@@ -43,6 +43,51 @@ using std::endl; + + namespace Xutil { + ++FbTk::FbString getWMClientMachine(Window window) { ++ ++ if (window == None) ++ return FbTk::FbString(""); ++ ++ Display *display = FbTk::App::instance()->display(); ++ ++ XTextProperty text_prop; ++ text_prop.value = 0; ++ char **list = 0; ++ int num = 0; ++ _FB_USES_NLS; ++ FbTk::FbString name; ++ ++ if (XGetWMClientMachine(display, window, &text_prop)) { ++ if (text_prop.value && text_prop.nitems > 0) { ++ if (text_prop.encoding != XA_STRING) { ++ ++ text_prop.nitems = strlen((char *) text_prop.value); ++ XmbTextPropertyToTextList(display, &text_prop, &list, &num); ++ ++ if (num > 0 && list != 0) ++ name = FbTk::FbStringUtil::LocaleStrToFb(static_cast<char *>(*list)); ++ else ++ name = text_prop.value ? FbTk::FbStringUtil::XStrToFb((char *)text_prop.value) : ""; ++ ++ if (list) ++ XFreeStringList(list); ++ ++ } else ++ name = text_prop.value ? FbTk::FbStringUtil::XStrToFb((char *)text_prop.value) : ""; ++ ++ XFree(text_prop.value); ++ ++ } else { // default name ++ name = _FB_XTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME"); ++ } ++ } else { ++ // default name ++ name = _FB_XTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME"); ++ } ++ ++ return name; ++} ++ + FbTk::FbString getWMName(Window window) { + + if (window == None) +--- a/src/Xutil.hh ++++ b/src/Xutil.hh +@@ -28,6 +28,7 @@ + + namespace Xutil { + ++FbTk::FbString getWMClientMachine(Window window); + FbTk::FbString getWMName(Window window); + + FbTk::FbString getWMClassName(Window win); +--- a/src/WinClient.cc ++++ b/src/WinClient.cc +@@ -49,6 +49,7 @@ + #else + #include <string.h> + #endif ++#include<unistd.h> + + using std::string; + using std::list; +@@ -217,6 +218,10 @@ bool WinClient::getAttrib(XWindowAttribu + return XGetWindowAttributes(display(), window(), &attr); + } + ++bool WinClient::getWMClientMachine(XTextProperty &textprop) const { ++ return XGetWMClientMachine(display(), window(), &textprop); ++} ++ + bool WinClient::getWMName(XTextProperty &textprop) const { + return XGetWMName(display(), window(), &textprop); + } +@@ -319,7 +324,14 @@ void WinClient::updateTitle() { + if (m_title_override) + return; + +- m_title.setLogical(FbTk::FbString(Xutil::getWMName(window()), 0, 512)); ++ FbTk::FbString fullname = FbTk::FbString(Xutil::getWMName(window()), 0, 512); ++ FbTk::FbString clientmachine = FbTk::FbString(Xutil::getWMClientMachine(window()), 0, 512); ++ char *host = new char[512]; gethostname(host, 512); ++ FbTk::FbString hostname = FbTk::FbString(host); ++ if (clientmachine != "Unnamed" && clientmachine != "" && clientmachine != hostname) { ++ fullname += " (on " + clientmachine + ")"; ++ } ++ m_title.setLogical(fullname); + m_title_update_timer.start(); + } + +@@ -328,7 +340,14 @@ void WinClient::emitTitleSig() { + } + + void WinClient::setTitle(const FbTk::FbString &title) { +- m_title.setLogical(title); ++ FbTk::FbString fullname = title; ++ FbTk::FbString clientmachine = FbTk::FbString(Xutil::getWMClientMachine(window()), 0, 512); ++ char *host = new char[512]; gethostname(host, 512); ++ FbTk::FbString hostname = FbTk::FbString(host); ++ if (clientmachine != "Unnamed" && clientmachine != "" && clientmachine != hostname) { ++ fullname += " (on " + clientmachine + ")"; ++ } ++ m_title.setLogical(fullname); + m_title_override = true; + m_title_update_timer.start(); + } +--- a/src/WinClient.hh ++++ b/src/WinClient.hh +@@ -91,6 +91,7 @@ public: + // + + bool getAttrib(XWindowAttributes &attr) const; ++ bool getWMClientMachine(XTextProperty &textprop) const; + bool getWMName(XTextProperty &textprop) const; + bool getWMIconName(XTextProperty &textprop) const; + std::string getWMRole() const; diff --git a/fluxbox/debian/patches/fix-startup-check-fbautostart.patch b/fluxbox/debian/patches/fix-startup-check-fbautostart.patch new file mode 100644 index 0000000..502b141 --- /dev/null +++ b/fluxbox/debian/patches/fix-startup-check-fbautostart.patch @@ -0,0 +1,33 @@ +From: Paul Tagliamonte <paultag@fluxbox.org> +Date: Fri, 18 May 2012 19:36:19 -0400 +Subject: Debian-local change to check if fbautostart exists. + + This is to better integrate the two apps, without fbautostart + having to restort to gross hacks to get it's self started up, or + give the user correct (but unexpected) behavior. +--- + util/startfluxbox.in | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/util/startfluxbox.in b/util/startfluxbox.in +index 3c083f3..70a9698 100755 +--- a/util/startfluxbox.in ++++ b/util/startfluxbox.in +@@ -49,6 +49,14 @@ xmodmap "$HOME/.Xmodmap" + # wmnd & + # wmsmixer -w & + # idesk & ++# ++# Debian-local change: ++# - fbautostart has been added with a quick hack to check to see if it ++# exists. If it does, we'll start it up by default. ++which fbautostart > /dev/null ++if [ \$? -eq 0 ]; then ++ fbautostart ++fi + + # And last but not least we start fluxbox. + # Because it is the last app you have to run it with ''exec'' before it. +-- +1.7.9.5 + diff --git a/fluxbox/debian/patches/fix-xterm-keybinding.patch b/fluxbox/debian/patches/fix-xterm-keybinding.patch new file mode 100644 index 0000000..7375982 --- /dev/null +++ b/fluxbox/debian/patches/fix-xterm-keybinding.patch @@ -0,0 +1,24 @@ +From: Paul Tagliamonte <paultag@ubuntu.com> +Author: Daniel Diaz <dydyam@gmail.com> +Date: Thu, August 12th, 2010 07:06:01 +0000 +Subject: Keybinding fix: Change `xterm' to `x-terminal-emulator' +Description: + This changes the default keybinding from xterm to x-terminal-emulator, + which is more complient with Debian policy. This is a local change only, + for the most part. +Origin: local +Forwarded: not-needed + +diff --git a/data/keys b/data/keys +index 7e2557c..b02f80f 100644 +--- a/data/keys ++++ b/data/keys +@@ -58,7 +58,7 @@ Mod4 8 :Tab 8 + Mod4 9 :Tab 9 + + # open a terminal +-Mod1 F1 :Exec xterm ++Mod1 F1 :Exec x-terminal-emulator + + # open a dialog to run programs + Mod1 F2 :Exec fbrun diff --git a/fluxbox/debian/patches/series b/fluxbox/debian/patches/series new file mode 100644 index 0000000..532287c --- /dev/null +++ b/fluxbox/debian/patches/series @@ -0,0 +1,3 @@ +fix-xterm-keybinding.patch +fix-startup-check-fbautostart.patch +fluxbox-add-hostname-part3.patch |