summaryrefslogtreecommitdiffstats
path: root/redhat/tdebase/kdebase-3.5.13-fix_fqdn_in_title.patch
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2013-06-24 19:50:32 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2013-06-24 19:50:32 +0200
commitb4359e8bf97799f83dc1ca62744db7cfcc81bc87 (patch)
tree3346872613490cc467c19e1645d0026c1221bce7 /redhat/tdebase/kdebase-3.5.13-fix_fqdn_in_title.patch
parent4cc71d79c5718d59078d06c497a56d7c05b41576 (diff)
downloadtde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.tar.gz
tde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.zip
RPM Packaging: rename directories
Diffstat (limited to 'redhat/tdebase/kdebase-3.5.13-fix_fqdn_in_title.patch')
-rw-r--r--redhat/tdebase/kdebase-3.5.13-fix_fqdn_in_title.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/redhat/tdebase/kdebase-3.5.13-fix_fqdn_in_title.patch b/redhat/tdebase/kdebase-3.5.13-fix_fqdn_in_title.patch
new file mode 100644
index 000000000..74122ec46
--- /dev/null
+++ b/redhat/tdebase/kdebase-3.5.13-fix_fqdn_in_title.patch
@@ -0,0 +1,46 @@
+commit d409abdbef8dd8b72bb2f311fcaa7456bdc2404b
+Author: Luboš Luňák <l.lunak@suse.cz>
+Date: Fri Mar 4 16:22:23 2011 +0100
+
+ do not show hostname in titlebar if it's FQDN of localhost
+
+diff --git a/kwin/utils.cpp b/kwin/utils.cpp
+--- a/kwin/utils.cpp
++++ b/kwin/utils.cpp
+@@ -18,6 +18,8 @@
+ #include "utils.h"
+
+ #include <unistd.h>
++#include <string.h>
++#include <netdb.h>
+
+ #ifndef KCMRULES
+
+@@ -323,6 +325,27 @@ bool isLocalMachine( const TQCString& host )
+ if( host == hostnamebuf )
+ return true;
+ }
++ else
++ { // e.g. LibreOffice likes to give FQDN, even if gethostname() doesn't include domain
++ struct addrinfo hints, *res, *addr;
++ bool is_local = false;
++
++ memset (&hints, 0, sizeof (hints));
++ hints.ai_family = PF_UNSPEC;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags |= AI_CANONNAME;
++
++ if( getaddrinfo( host, NULL, &hints, &res ) != 0)
++ return false;
++ for(addr = res; !is_local && addr; addr = addr->ai_next)
++ {
++ if( res->ai_canonname &&
++ host == TQCString( res->ai_canonname ))
++ is_local = true;
++ }
++ freeaddrinfo(res);
++ return is_local;
++ }
+ }
+ return false;
+ }