From d27cef98da229fea93571209bc6fefc23e0717ce Mon Sep 17 00:00:00 2001 From: Robert Kuszinger Date: Fri, 21 Dec 2007 14:36:05 +0100 Subject: [PATCH 01/79] Add Hungarian translation. --- po/LINGUAS | 1 + po/hu.po | 345 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 346 insertions(+) create mode 100644 po/hu.po diff --git a/po/LINGUAS b/po/LINGUAS index d361d7a2..33191bfc 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -22,5 +22,6 @@ it vi ja ua +hu #hr diff --git a/po/hu.po b/po/hu.po new file mode 100644 index 00000000..75f49ebf --- /dev/null +++ b/po/hu.po @@ -0,0 +1,345 @@ +# Hungarian messages for openbox. +# Copyright (C) 2007 Mikael Magnusson +# This file is distributed under the same license as the openbox package. +# Robert Kuszinger , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: openbox 3.4.3\n" +"Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" +"POT-Creation-Date: 2007-11-12 19:12+0100\n" +"PO-Revision-Date: 2007-12-21 14:33+0100\n" +"Last-Translator: Robert Kuszinger \n" +"Language-Team: Hungarian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: openbox/actions/execute.c:88 +#, c-format +msgid "Failed to convert the path '%s' from utf8" +msgstr "Az útvonalat nem sikerült átalakítani utf8-ból: '%s'" + +#: openbox/actions/execute.c:97 openbox/actions/execute.c:115 +#, c-format +msgid "Failed to execute '%s': %s" +msgstr "Nem sikerült futtatni ezt a programot '%s': %s" + +#: openbox/client_list_combined_menu.c:90 openbox/client_list_menu.c:93 +msgid "Go there..." +msgstr "Menjünk oda..." + +#: openbox/client_list_combined_menu.c:96 +msgid "Manage desktops" +msgstr "Munkaasztal-kezelés" + +#: openbox/client_list_combined_menu.c:97 openbox/client_list_menu.c:156 +msgid "_Add new desktop" +msgstr "Új _munkaasztal" + +#: openbox/client_list_combined_menu.c:98 openbox/client_list_menu.c:157 +msgid "_Remove last desktop" +msgstr "Utolsó munkaasztal _eltávolítása" + +#: openbox/client_list_combined_menu.c:150 +msgid "Windows" +msgstr "Ablakok" + +#: openbox/client_list_menu.c:203 +msgid "Desktops" +msgstr "Munkaasztalok" + +#: openbox/client_menu.c:256 +msgid "All desktops" +msgstr "Összes munkaasztal" + +#: openbox/client_menu.c:360 +msgid "_Layer" +msgstr "_Réteg" + +#: openbox/client_menu.c:365 +msgid "Always on _top" +msgstr "Mindig _felül" + +#: openbox/client_menu.c:366 +msgid "_Normal" +msgstr "_Normál" + +#: openbox/client_menu.c:367 +msgid "Always on _bottom" +msgstr "Mindig _alul" + +#: openbox/client_menu.c:370 +msgid "_Send to desktop" +msgstr "Munkaasztalra _küldeni" + +#: openbox/client_menu.c:374 +msgid "Client menu" +msgstr "Kliens menü" + +#: openbox/client_menu.c:384 +msgid "R_estore" +msgstr "_Visszaállítás" + +#: openbox/client_menu.c:392 +msgid "_Move" +msgstr "_Mozgatás" + +#: openbox/client_menu.c:394 +msgid "Resi_ze" +msgstr "_Átméretezés" + +#: openbox/client_menu.c:396 +msgid "Ico_nify" +msgstr "Iko_nná alakítás" + +#: openbox/client_menu.c:404 +msgid "Ma_ximize" +msgstr "Ma_ximalizálás" + +#: openbox/client_menu.c:412 +msgid "_Roll up/down" +msgstr "_Görgetés fel/le" + +#: openbox/client_menu.c:414 +msgid "Un/_Decorate" +msgstr "_Dekoráció eltávilítása" + +#: openbox/client_menu.c:418 +msgid "_Close" +msgstr "_Bezárás" + +#: openbox/config.c:740 +#, c-format +msgid "Invalid button '%s' specified in config file" +msgstr "Érvénytelen gomb a konfigurációs fájlban '%s'" + +#: openbox/keyboard.c:156 +msgid "Conflict with key binding in config file" +msgstr "Ütköző billentyű-műveletek a konfigurációs fájlban" + +#: openbox/menu.c:103 openbox/menu.c:111 +#, c-format +msgid "Unable to find a valid menu file '%s'" +msgstr "Nem található ilyen érvényes menü fájl: '%s'" + +#: openbox/menu.c:171 +#, c-format +msgid "Failed to execute command for pipe-menu '%s': %s" +msgstr "Sikertelen parancsfuttatás a csővezeték-menüben '%s': %s" + +#: openbox/menu.c:185 +#, c-format +msgid "Invalid output from pipe-menu '%s'" +msgstr "Érvnytelen válasz a csővezeték menüből '%s'" + +#: openbox/menu.c:198 +#, c-format +msgid "Attempted to access menu '%s' but it does not exist" +msgstr "'%s' menü elérésére történt kísérlet, de az nem létezik" + +#: openbox/menu.c:368 openbox/menu.c:369 +msgid "More..." +msgstr "Tovább..." + +#: openbox/mouse.c:349 +#, c-format +msgid "Invalid button '%s' in mouse binding" +msgstr "Érvénytelen gomb '%s' az egér parancsoknál" + +#: openbox/mouse.c:355 +#, c-format +msgid "Invalid context '%s' in mouse binding" +msgstr "Érvénytelen környezet az egér parancsoknál: '%s'" + +#: openbox/openbox.c:129 +#, c-format +msgid "Unable to change to home directory '%s': %s" +msgstr "Nem lehet a saját mappába váltani '%s': %s" + +#: openbox/openbox.c:149 +msgid "Failed to open the display from the DISPLAY environment variable." +msgstr "Nem nyitható meg a DISPLAY változóban beállított képernyő" + +#: openbox/openbox.c:180 +msgid "Failed to initialize the obrender library." +msgstr "Nem sikerült használatba venni az obernder függvénykönyvtárat" + +#: openbox/openbox.c:186 +msgid "X server does not support locale." +msgstr "Az X kiszolgáló nem támogatja ezt a nemzetközi beállítást." + +#: openbox/openbox.c:188 +msgid "Cannot set locale modifiers for the X server." +msgstr "A nemzetközi beálljtás módosítók nem állíthatók be az X szerveren." + +#: openbox/openbox.c:251 +msgid "Unable to find a valid config file, using some simple defaults" +msgstr "Nincs konfigurációs fájl, ezért egyszerű alapértelmezéseket használunk" + +#: openbox/openbox.c:277 +msgid "Unable to load a theme." +msgstr "Nem tölthető be a téma." + +#: openbox/openbox.c:402 +#, c-format +msgid "Restart failed to execute new executable '%s': %s" +msgstr "Az újraindítás során ez az új program nem volt indítható '%s': %s" + +#: openbox/openbox.c:472 openbox/openbox.c:474 +msgid "Copyright (c)" +msgstr "Szerzői jogok (c)" + +#: openbox/openbox.c:483 +msgid "Syntax: openbox [options]\n" +msgstr "Használat: openbox [options]\n" + +#: openbox/openbox.c:484 +msgid "" +"\n" +"Options:\n" +msgstr "" +"\n" +"Opciók:\n" + +#: openbox/openbox.c:485 +msgid " --help Display this help and exit\n" +msgstr " --help Súgó megjelenítése és kilépés\n" + +#: openbox/openbox.c:486 +msgid " --version Display the version and exit\n" +msgstr " --version Verzió kiírása majd kilépés\n" + +#: openbox/openbox.c:487 +msgid " --replace Replace the currently running window manager\n" +msgstr " --replace Futó ablakkezelő cseréje\n" + +#: openbox/openbox.c:488 +msgid " --sm-disable Disable connection to the session manager\n" +msgstr " --sm-disable Ne csatlakozzon a szekció-kezelőhöz\n" + +#: openbox/openbox.c:489 +msgid "" +"\n" +"Passing messages to a running Openbox instance:\n" +msgstr "" +"\n" +"Üzenet küldése a futó Openbox példánynak\n" + +#: openbox/openbox.c:490 +msgid " --reconfigure Reload Openbox's configuration\n" +msgstr " --reconfigure Konfiguráció úrjatöltése\n" + +#: openbox/openbox.c:491 +msgid " --restart Restart Openbox\n" +msgstr " --restart Openbox újraindítása\n" + +#: openbox/openbox.c:492 +msgid " --exit Exit Openbox\n" +msgstr " --exit Kilépés az Openboxból\n" + +#: openbox/openbox.c:493 +msgid "" +"\n" +"Debugging options:\n" +msgstr "" +"\n" +"Debug (hibakereső) lehetőségek:\n" + +#: openbox/openbox.c:494 +msgid " --sync Run in synchronous mode\n" +msgstr " --sync Futtatás szinkron módban\n" + +#: openbox/openbox.c:495 +msgid " --debug Display debugging output\n" +msgstr " --debug Hibakeresési információk megjelenítése\n" + +#: openbox/openbox.c:496 +msgid " --debug-focus Display debugging output for focus handling\n" +msgstr "" +" --debug-focus Fókuszkezelésre vonatkozó hibakeresési információk " +"kiírása\n" + +#: openbox/openbox.c:497 +msgid " --debug-xinerama Split the display into fake xinerama screens\n" +msgstr " --debug-xinerama Képernyő felosztása két ál-xinerama képernyőre\n" + +#: openbox/openbox.c:498 +#, c-format +msgid "" +"\n" +"Please report bugs at %s\n" +msgstr "" +"\n" +"Légyszi jelentsd a hibát itt: %s\n" + +#: openbox/openbox.c:599 +#, c-format +msgid "Invalid command line argument '%s'\n" +msgstr "Érvénytelen parancssori opció: '%s'\n" + +#: openbox/screen.c:96 openbox/screen.c:184 +#, c-format +msgid "A window manager is already running on screen %d" +msgstr "Már fut egy ablakkezelő ezen a képernyőn %d" + +#: openbox/screen.c:118 +#, c-format +msgid "Could not acquire window manager selection on screen %d" +msgstr "Nem tudok ablakkezelőt váltani ezen a képernyőn %d" + +#: openbox/screen.c:139 +#, c-format +msgid "The WM on screen %d is not exiting" +msgstr "Ezen a képernyőn: %d az ablakkezelő nem lép ki" + +#: openbox/screen.c:1087 +#, c-format +msgid "desktop %i" +msgstr "%i. munkaasztal" + +#: openbox/session.c:103 +#, c-format +msgid "Unable to make directory '%s': %s" +msgstr "Nem hozható létre a könyvtár '%s': %s" + +#: openbox/session.c:451 +#, c-format +msgid "Unable to save the session to '%s': %s" +msgstr "Nem tudom elmenti ide a futó környezetet '%s': %s" + +#: openbox/session.c:583 +#, c-format +msgid "Error while saving the session to '%s': %s" +msgstr "Hiba a futási környezet mentése közben '%s': %s" + +#: openbox/startupnotify.c:237 +#, c-format +msgid "Running %s\n" +msgstr "Futtatás %s\n" + +#: openbox/translate.c:58 +#, c-format +msgid "Invalid modifier key '%s' in key/mouse binding" +msgstr "Érvénytelen módosító gomb '%s' egér vagy billentyűparancsnál" + +#: openbox/translate.c:135 +#, c-format +msgid "Invalid key code '%s' in key binding" +msgstr "Érvénytelen billentyűkód '%s' billentyűparancsnál" + +#: openbox/translate.c:142 +#, c-format +msgid "Invalid key name '%s' in key binding" +msgstr "Érvénytelen billentyűnév '%s' billentyűparancsnál" + +#: openbox/translate.c:148 +#, c-format +msgid "Requested key '%s' does not exist on the display" +msgstr "A kért gomb '%s' nem létezik a képernyőn" + +#: openbox/xerror.c:39 +#, c-format +msgid "X Error: %s" +msgstr "X rendszer hiba: %s" From 585098c3b661bca51755715d35bdd23104a452c1 Mon Sep 17 00:00:00 2001 From: Eric Lassauge Date: Tue, 8 Jan 2008 21:07:54 +0100 Subject: [PATCH 02/79] Update french translation with --exit help and use french punctuation rules. --- po/fr.po | 68 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/po/fr.po b/po/fr.po index 13a77f79..7ec69158 100644 --- a/po/fr.po +++ b/po/fr.po @@ -5,14 +5,15 @@ # tioui , 2004. # Cyrille Bagard , 2007. # Jacques BON , 2007. +# ric Lassauge , 2008 # msgid "" msgstr "" -"Project-Id-Version: Openbox 3.4.3\n" +"Project-Id-Version: Openbox 3.4.5\n" "Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" "POT-Creation-Date: 2007-11-12 19:12+0100\n" -"PO-Revision-Date: 2007-08-17 22:25+0200\n" -"Last-Translator: Jacques BON \n" +"PO-Revision-Date: 2008-01-08 12:25+0200\n" +"Last-Translator: ric Lassauge \n" "Language-Team: franais \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -21,16 +22,16 @@ msgstr "" #: openbox/actions/execute.c:88 #, c-format msgid "Failed to convert the path '%s' from utf8" -msgstr "chec de la conversion du chemin '%s' depuis l'UTF-8" +msgstr "chec de la conversion du chemin %s depuis l'UTF-8" #: openbox/actions/execute.c:97 openbox/actions/execute.c:115 #, c-format msgid "Failed to execute '%s': %s" -msgstr "chec de l'excution de '%s': %s" +msgstr "chec de l'excution de %s: %s" #: openbox/client_list_combined_menu.c:90 openbox/client_list_menu.c:93 msgid "Go there..." -msgstr "Aller ..." +msgstr "Aller l..." #: openbox/client_list_combined_menu.c:96 msgid "Manage desktops" @@ -115,7 +116,7 @@ msgstr "_Fermer" #: openbox/config.c:740 #, c-format msgid "Invalid button '%s' specified in config file" -msgstr "Bouton indiqu dans le fichier de configuration '%s' invalide" +msgstr "Bouton %s indiqu dans le fichier de configuration invalide" #: openbox/keyboard.c:156 msgid "Conflict with key binding in config file" @@ -124,41 +125,41 @@ msgstr "Conflit entre les raccourcis clavier dans le fichier de configuration" #: openbox/menu.c:103 openbox/menu.c:111 #, c-format msgid "Unable to find a valid menu file '%s'" -msgstr "Impossible de trouver un fichier de menus valide '%s'" +msgstr "Impossible de trouver un fichier de menus valide %s" #: openbox/menu.c:171 #, c-format msgid "Failed to execute command for pipe-menu '%s': %s" -msgstr "Echec lors de l'excution de la commande pour un pipe-menu '%s': %s" +msgstr "chec lors de l'excution de la commande pour un pipe-menu %s: %s" #: openbox/menu.c:185 #, c-format msgid "Invalid output from pipe-menu '%s'" -msgstr "Sortie du pipe-menu invalide '%s'" +msgstr "Sortie du pipe-menu invalide %s" #: openbox/menu.c:198 #, c-format msgid "Attempted to access menu '%s' but it does not exist" -msgstr "Tentative d'accs au menu '%s' qui n'existe pas" +msgstr "Tentative d'accs au menu %s qui n'existe pas" #: openbox/menu.c:368 openbox/menu.c:369 msgid "More..." -msgstr "Davantage..." +msgstr "Plus..." #: openbox/mouse.c:349 #, c-format msgid "Invalid button '%s' in mouse binding" -msgstr "Bouton '%s' invalide dans le paramtrage de la souris" +msgstr "Bouton %s invalide dans le paramtrage de la souris" #: openbox/mouse.c:355 #, c-format msgid "Invalid context '%s' in mouse binding" -msgstr "Contexte '%s' invalide dans le paramtrage de la souris" +msgstr "Contexte %s invalide dans le paramtrage de la souris" #: openbox/openbox.c:129 #, c-format msgid "Unable to change to home directory '%s': %s" -msgstr "Impossible de changer vers le rpertoire de l'utilisateur '%s': %s" +msgstr "Impossible de changer vers le rpertoire de l'utilisateur %s: %s" #: openbox/openbox.c:149 msgid "Failed to open the display from the DISPLAY environment variable." @@ -182,7 +183,7 @@ msgstr "" #: openbox/openbox.c:251 msgid "Unable to find a valid config file, using some simple defaults" msgstr "" -"Impossible de trouver un fichier de configuration valide ; utilisation de " +"Impossible de trouver un fichier de configuration valide, utilisation de " "dfauts simples" #: openbox/openbox.c:277 @@ -192,7 +193,8 @@ msgstr "Impossible de charger un th #: openbox/openbox.c:402 #, c-format msgid "Restart failed to execute new executable '%s': %s" -msgstr "Le redmarrage n'a pas russi excuter le nouvel excutable '%s': %s" +msgstr "" +"Le redmarrage n'a pas russi excuter le nouvel excutable %s: %s" #: openbox/openbox.c:472 openbox/openbox.c:474 msgid "Copyright (c)" @@ -200,7 +202,7 @@ msgstr "Copyright (c)" #: openbox/openbox.c:483 msgid "Syntax: openbox [options]\n" -msgstr "Syntaxe: openbox [options]\n" +msgstr "Syntaxe: openbox [options]\n" #: openbox/openbox.c:484 msgid "" @@ -208,7 +210,7 @@ msgid "" "Options:\n" msgstr "" "\n" -"Options:\n" +"Options:\n" #: openbox/openbox.c:485 msgid " --help Display this help and exit\n" @@ -235,7 +237,7 @@ msgid "" "Passing messages to a running Openbox instance:\n" msgstr "" "\n" -"Passage de messages l'instance d'Openbox en marche:\n" +"Passage de messages l'instance d'Openbox en cours:\n" #: openbox/openbox.c:490 msgid " --reconfigure Reload Openbox's configuration\n" @@ -248,7 +250,7 @@ msgstr " --restart Red #: openbox/openbox.c:492 #, fuzzy msgid " --exit Exit Openbox\n" -msgstr "" +msgstr " --exit Sortir d'Openbox\n" #: openbox/openbox.c:493 msgid "" @@ -256,7 +258,7 @@ msgid "" "Debugging options:\n" msgstr "" "\n" -"Options de dboguage:\n" +"Options de dboguage:\n" #: openbox/openbox.c:494 msgid " --sync Run in synchronous mode\n" @@ -289,7 +291,7 @@ msgstr "" #: openbox/openbox.c:599 #, c-format msgid "Invalid command line argument '%s'\n" -msgstr "Argument de la ligne de commande invalide '%s'\n" +msgstr "Argument de la ligne de commande invalide %s\n" #: openbox/screen.c:96 openbox/screen.c:184 #, c-format @@ -307,7 +309,7 @@ msgstr "" #, c-format msgid "The WM on screen %d is not exiting" msgstr "" -"Le gestionnaire de fentres sur l'cran %d n'est pas en train de quitter" +"Le gestionnaire de fentres sur l'cran %d n'est pas en train de se terminer" #: openbox/screen.c:1087 #, c-format @@ -317,17 +319,17 @@ msgstr "bureau %i" #: openbox/session.c:103 #, c-format msgid "Unable to make directory '%s': %s" -msgstr "Impossible de crer le rpertoire '%s': %s" +msgstr "Impossible de crer le rpertoire %s: %s" #: openbox/session.c:451 #, c-format msgid "Unable to save the session to '%s': %s" -msgstr "Impossible de sauvegarder la session de '%s': %s" +msgstr "Impossible de sauvegarder la session dans %s: %s" #: openbox/session.c:583 #, c-format msgid "Error while saving the session to '%s': %s" -msgstr "Erreur lors de la sauvegarde de la session de '%s': %s" +msgstr "Erreur lors de la sauvegarde de la session depuis %s: %s" #: openbox/startupnotify.c:237 #, c-format @@ -338,25 +340,25 @@ msgstr "Ex #, c-format msgid "Invalid modifier key '%s' in key/mouse binding" msgstr "" -"Touche de modification '%s' invalide dans le paramtrage du clavier / de la " -"souris" +"Touche de modification %s invalide dans le paramtrage du clavier / de " +"la souris" #: openbox/translate.c:135 #, c-format msgid "Invalid key code '%s' in key binding" -msgstr "Code de touche '%s' invalide dans le raccourci clavier" +msgstr "Code de touche %s invalide dans le raccourci clavier" #: openbox/translate.c:142 #, c-format msgid "Invalid key name '%s' in key binding" -msgstr "Nom de touche '%s' invalide dans le raccourci clavier" +msgstr "Nom de touche %s invalide dans le raccourci clavier" #: openbox/translate.c:148 #, c-format msgid "Requested key '%s' does not exist on the display" -msgstr "La touche demande '%s' n'existe pas pour l'affichage" +msgstr "La touche demande %s n'existe pas pour l'affichage" #: openbox/xerror.c:39 #, c-format msgid "X Error: %s" -msgstr "Erreur X: %s" +msgstr "Erreur X: %s" From 9ad2ec9700038364a3a0a22cabb94b05e1b933e5 Mon Sep 17 00:00:00 2001 From: Quan Tran Date: Wed, 9 Jan 2008 21:34:19 +0100 Subject: [PATCH 03/79] Add --exit translation to vietnamese translation. --- po/vi.po | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/po/vi.po b/po/vi.po index 13528b59..0d08aa28 100644 --- a/po/vi.po +++ b/po/vi.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Openbox 3.4.3\n" +"Project-Id-Version: Openbox 3.4.5\n" "Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" "POT-Creation-Date: 2007-11-12 19:12+0100\n" -"PO-Revision-Date: 2007-07-20 16:48+0200\n" +"PO-Revision-Date: 2008-01-09 21:33+0100\n" "Last-Translator: Quan Tran \n" "Language-Team: None\n" "MIME-Version: 1.0\n" @@ -236,9 +236,8 @@ msgid " --restart Restart Openbox\n" msgstr " --restart Bắt đầu lại Openbox\n" #: openbox/openbox.c:492 -#, fuzzy msgid " --exit Exit Openbox\n" -msgstr "" +msgstr " --exit Đi ra Openbox\n" #: openbox/openbox.c:493 msgid "" From b155a17305e555233bf7d7062db7370a48d8f93c Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 11 Jan 2008 02:04:39 +0100 Subject: [PATCH 04/79] Correct .po version headers. --- po/fi.po | 2 +- po/hu.po | 2 +- po/no.po | 2 +- po/sv.po | 2 +- po/ua.po | 2 +- po/zh_TW.po | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/po/fi.po b/po/fi.po index d2d5e240..63c92690 100644 --- a/po/fi.po +++ b/po/fi.po @@ -7,7 +7,7 @@ # msgid "" msgstr "" -"Project-Id-Version: openbox 3.4.3\n" +"Project-Id-Version: Openbox 3.4.3\n" "Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" "POT-Creation-Date: 2007-11-12 19:12+0100\n" "PO-Revision-Date: 2007-10-22 15:58+0200\n" diff --git a/po/hu.po b/po/hu.po index 75f49ebf..c9c2dccf 100644 --- a/po/hu.po +++ b/po/hu.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: openbox 3.4.3\n" +"Project-Id-Version: Openbox 3.4.3\n" "Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" "POT-Creation-Date: 2007-11-12 19:12+0100\n" "PO-Revision-Date: 2007-12-21 14:33+0100\n" diff --git a/po/no.po b/po/no.po index 4f801943..ec72a932 100644 --- a/po/no.po +++ b/po/no.po @@ -5,7 +5,7 @@ # Michael Kjelbergvik Thung , 2007. msgid "" msgstr "" -"Project-Id-Version: openbox 3.4.3\n" +"Project-Id-Version: Openbox 3.4.3\n" "Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" "POT-Creation-Date: 2007-11-12 19:12+0100\n" "PO-Revision-Date: 2007-05-20 18:41+0200\n" diff --git a/po/sv.po b/po/sv.po index b024d8ed..3518f258 100644 --- a/po/sv.po +++ b/po/sv.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: openbox 3.4.3\n" +"Project-Id-Version: Openbox 3.4.5\n" "Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" "POT-Creation-Date: 2007-11-12 19:12+0100\n" "PO-Revision-Date: 2007-05-22 00:29+0200\n" diff --git a/po/ua.po b/po/ua.po index d4c73a4a..4770c333 100644 --- a/po/ua.po +++ b/po/ua.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: openbox 3.4.2\n" +"Project-Id-Version: Openbox 3.4.2\n" "Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" "POT-Creation-Date: 2007-11-12 19:12+0100\n" "PO-Revision-Date: 2007-06-16 13:02+0200\n" diff --git a/po/zh_TW.po b/po/zh_TW.po index fd495212..5a7c0498 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: openbox 3.4.3\n" +"Project-Id-Version: Openbox 3.4.3\n" "Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" "POT-Creation-Date: 2007-11-12 19:12+0100\n" "PO-Revision-Date: 2007-07-23 23:22+0200\n" From 40ed213d4bdbb8c6cb5690a902433725cf97f693 Mon Sep 17 00:00:00 2001 From: Inko Illarramendi Arancibia Date: Fri, 11 Jan 2008 02:09:31 +0100 Subject: [PATCH 05/79] Add new Basque translation. --- po/LINGUAS | 1 + po/eu.po | 348 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 349 insertions(+) create mode 100644 po/eu.po diff --git a/po/LINGUAS b/po/LINGUAS index 33191bfc..d95268a1 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -2,6 +2,7 @@ zh_TW zh_CN de es +eu ca sv sk diff --git a/po/eu.po b/po/eu.po new file mode 100644 index 00000000..2425f10e --- /dev/null +++ b/po/eu.po @@ -0,0 +1,348 @@ +# Basque translation for openbox. +# Copyright (C) 2008 Inko Illarramendi Arancibia +# This file is distributed under the same license as the openbox package. +# Inko Illarramendi Arancibia , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: Openbox 3.4.5\n" +"Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n" +"POT-Creation-Date: 2007-11-12 19:12+0100\n" +"PO-Revision-Date: 2008-01-11 01:00+0100\n" +"Last-Translator: Inko I. A. \n" +"Language-Team: Inko I. A. \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: openbox/actions/execute.c:88 +#, c-format +msgid "Failed to convert the path '%s' from utf8" +msgstr "Hutsegitea '%s' helbidea utf8-tik bihurtzean" + +#: openbox/actions/execute.c:97 openbox/actions/execute.c:115 +#, c-format +msgid "Failed to execute '%s': %s" +msgstr "Hutsegitea '%s' exekutatzean: %s" + +#: openbox/client_list_combined_menu.c:90 openbox/client_list_menu.c:93 +msgid "Go there..." +msgstr "Hona joan..." + +#: openbox/client_list_combined_menu.c:96 +msgid "Manage desktops" +msgstr "Idazmahaiak kudeatu" + +#: openbox/client_list_combined_menu.c:97 openbox/client_list_menu.c:156 +msgid "_Add new desktop" +msgstr "Idazmahai berria _gehitu" + +#: openbox/client_list_combined_menu.c:98 openbox/client_list_menu.c:157 +msgid "_Remove last desktop" +msgstr "Azken idazmahaia _ezabatu" + +#: openbox/client_list_combined_menu.c:150 +msgid "Windows" +msgstr "Leihoak" + +#: openbox/client_list_menu.c:203 +msgid "Desktops" +msgstr "Idazmahaiak" + +#: openbox/client_menu.c:256 +msgid "All desktops" +msgstr "Idazmahai guztiak" + +#: openbox/client_menu.c:360 +msgid "_Layer" +msgstr "_Geruza" + +#: openbox/client_menu.c:365 +msgid "Always on _top" +msgstr "Beti _gainean" + +#: openbox/client_menu.c:366 +msgid "_Normal" +msgstr "_Ohikoa" + +#: openbox/client_menu.c:367 +msgid "Always on _bottom" +msgstr "Beti _azpian" + +#: openbox/client_menu.c:370 +msgid "_Send to desktop" +msgstr "_Bidali idazmahaira" + +#: openbox/client_menu.c:374 +msgid "Client menu" +msgstr "Bezero menua" + +#: openbox/client_menu.c:384 +msgid "R_estore" +msgstr "Berr_ezarri" + +#: openbox/client_menu.c:392 +msgid "_Move" +msgstr "_Mugitu" + +#: openbox/client_menu.c:394 +msgid "Resi_ze" +msgstr "_Tamaina aldatu" + +#: openbox/client_menu.c:396 +msgid "Ico_nify" +msgstr "Iko_notu" + +#: openbox/client_menu.c:404 +msgid "Ma_ximize" +msgstr "Ma_ximizatu" + +#: openbox/client_menu.c:412 +msgid "_Roll up/down" +msgstr "Bildu/_Zabaldu" + +#: openbox/client_menu.c:414 +msgid "Un/_Decorate" +msgstr "Des/_Dekoratu" + +#: openbox/client_menu.c:418 +msgid "_Close" +msgstr "_Itxi" + +#: openbox/config.c:740 +#, c-format +msgid "Invalid button '%s' specified in config file" +msgstr "Konfigurazio fitxategian zehaztutako '%s' botoia baliogabea" + +#: openbox/keyboard.c:156 +msgid "Conflict with key binding in config file" +msgstr "Gatazka konfigurazio fitxategiko tekla elkarketarekin" + +#: openbox/menu.c:103 openbox/menu.c:111 +#, c-format +msgid "Unable to find a valid menu file '%s'" +msgstr "Ezin da '%s' baliozko menu fitxategi bat aurkitu" + +#: openbox/menu.c:171 +#, c-format +msgid "Failed to execute command for pipe-menu '%s': %s" +msgstr "Hutsegitea '%s' pipe-menuarentzat komandoa exekutatzean: %s" + +#: openbox/menu.c:185 +#, c-format +msgid "Invalid output from pipe-menu '%s'" +msgstr "Baliogabeko irteera '%s' pipe-menutik" + +#: openbox/menu.c:198 +#, c-format +msgid "Attempted to access menu '%s' but it does not exist" +msgstr "'%s' menua atzitzen saiatu da baina ez da existitzen" + +#: openbox/menu.c:368 openbox/menu.c:369 +msgid "More..." +msgstr "Gehiago..." + +#: openbox/mouse.c:349 +#, c-format +msgid "Invalid button '%s' in mouse binding" +msgstr "Baliogabeko '%s' botoia sagu elkarketan" + +#: openbox/mouse.c:355 +#, c-format +msgid "Invalid context '%s' in mouse binding" +msgstr "Baliogabeko '%s' testuingurua sagu elkarketan" + +#: openbox/openbox.c:129 +#, c-format +msgid "Unable to change to home directory '%s': %s" +msgstr "Ezin da '%s' hasiera direktoriora aldatu: %s" + +#: openbox/openbox.c:149 +msgid "Failed to open the display from the DISPLAY environment variable." +msgstr "Hutsegitea pantaila irekitzean DISPLAY ingurune aldagaitik." + +#: openbox/openbox.c:180 +msgid "Failed to initialize the obrender library." +msgstr "Hutsegitea obrender liburutegia hasieratzean." + +#: openbox/openbox.c:186 +msgid "X server does not support locale." +msgstr "X zerbitzariak ez du locale euskarririk." + +#: openbox/openbox.c:188 +msgid "Cannot set locale modifiers for the X server." +msgstr "Ezin da locale modifikatzailerik ezarri X zerbitzariarentzat." + +#: openbox/openbox.c:251 +msgid "Unable to find a valid config file, using some simple defaults" +msgstr "" +"Ezin da baliozko konfigurazio fitxategirik aurkitu, hainbat aukera lehenetsi " +"sinple erabiltzen" + +#: openbox/openbox.c:277 +msgid "Unable to load a theme." +msgstr "Ezin da gai bat kargatu." + +#: openbox/openbox.c:402 +#, c-format +msgid "Restart failed to execute new executable '%s': %s" +msgstr "Berrabiarazteak hutsegitea '%s' exekutagarri berria exekutatzean: %s" + +#: openbox/openbox.c:472 openbox/openbox.c:474 +msgid "Copyright (c)" +msgstr "Copyright (c)" + +#: openbox/openbox.c:483 +msgid "Syntax: openbox [options]\n" +msgstr "Sintaxia: openbox [aukerak]\n" + +#: openbox/openbox.c:484 +msgid "" +"\n" +"Options:\n" +msgstr "" +"\n" +"Aukerak:\n" + +#: openbox/openbox.c:485 +msgid " --help Display this help and exit\n" +msgstr " --help Mezu hau erakutsi eta irten\n" + +#: openbox/openbox.c:486 +msgid " --version Display the version and exit\n" +msgstr " --version Bertsioa bistarazi eta irten\n" + +#: openbox/openbox.c:487 +msgid " --replace Replace the currently running window manager\n" +msgstr "" +" --replace Ordezkatu exekutatzen ari den leiho-kudeatzailea\n" + +#: openbox/openbox.c:488 +msgid " --sm-disable Disable connection to the session manager\n" +msgstr " --sm-disable Ezgaitu saio kudeatzailearekiko konexioa\n" + +#: openbox/openbox.c:489 +msgid "" +"\n" +"Passing messages to a running Openbox instance:\n" +msgstr "" +"\n" +"Exekutatzen ari den Openbox instantzia bati mezuak pasatzen:\n" + +#: openbox/openbox.c:490 +msgid " --reconfigure Reload Openbox's configuration\n" +msgstr " --reconfigure Birkargatu Openbox-en konfigurazioa\n" + +#: openbox/openbox.c:491 +msgid " --restart Restart Openbox\n" +msgstr " --restart Berrabiarazi Openbox\n" + +#: openbox/openbox.c:492 +msgid " --exit Exit Openbox\n" +msgstr " --exit Itxi Openbox\n" + +#: openbox/openbox.c:493 +msgid "" +"\n" +"Debugging options:\n" +msgstr "" +"\n" +"Arazketa aukerak:\n" + +#: openbox/openbox.c:494 +msgid " --sync Run in synchronous mode\n" +msgstr " --sync Modu sinkronoan exekutatu\n" + +#: openbox/openbox.c:495 +msgid " --debug Display debugging output\n" +msgstr " --debug Arazketa irteera erakutsi\n" + +#: openbox/openbox.c:496 +msgid " --debug-focus Display debugging output for focus handling\n" +msgstr " --debug-focus Erakutsi arazketa irteera foku maneiurako\n" + +#: openbox/openbox.c:497 +msgid " --debug-xinerama Split the display into fake xinerama screens\n" +msgstr " --debug-xinerama Zatitu pantaila xinerama pantaila faltsuetan\n" + +#: openbox/openbox.c:498 +#, c-format +msgid "" +"\n" +"Please report bugs at %s\n" +msgstr "" +"\n" +"%s helbidean erroreen berri eman mesedez\n" + +#: openbox/openbox.c:599 +#, c-format +msgid "Invalid command line argument '%s'\n" +msgstr "'%s' komando lerro argumentu baliogabea\n" + +#: openbox/screen.c:96 openbox/screen.c:184 +#, c-format +msgid "A window manager is already running on screen %d" +msgstr "" +"Bistaratzeko %d pantailan aurretik leiho-kudeatzaile bat exekutatzen ari da" + +#: openbox/screen.c:118 +#, c-format +msgid "Could not acquire window manager selection on screen %d" +msgstr "" +"Ezin izan da eskuratu leiho-kudeatzailearen hautapena bistaratzeko %d " +"pantailan" + +#: openbox/screen.c:139 +#, c-format +msgid "The WM on screen %d is not exiting" +msgstr "%d bistaratze pantailako leiho-kudeatzailea ez da irteten" + +#: openbox/screen.c:1087 +#, c-format +msgid "desktop %i" +msgstr "%i Idazmahaia" + +#: openbox/session.c:103 +#, c-format +msgid "Unable to make directory '%s': %s" +msgstr "Ezin da '%s' direktorioa sortu: %s" + +#: openbox/session.c:451 +#, c-format +msgid "Unable to save the session to '%s': %s" +msgstr "Ezin da saioa '%s'-n gorde: %s" + +#: openbox/session.c:583 +#, c-format +msgid "Error while saving the session to '%s': %s" +msgstr "Errorea saioa '%s'-n gordetzean: %s" + +#: openbox/startupnotify.c:237 +#, c-format +msgid "Running %s\n" +msgstr "Egikaritzen %s\n" + +#: openbox/translate.c:58 +#, c-format +msgid "Invalid modifier key '%s' in key/mouse binding" +msgstr " tekla/sagu elkarketan '%s' modifikatzaile tekla baliogabea" + +#: openbox/translate.c:135 +#, c-format +msgid "Invalid key code '%s' in key binding" +msgstr " tekla elkarketan '%s' tekla kode baliogabea" + +#: openbox/translate.c:142 +#, c-format +msgid "Invalid key name '%s' in key binding" +msgstr " tekla elkarketan '%s' tekla izen baliogabea" + +#: openbox/translate.c:148 +#, c-format +msgid "Requested key '%s' does not exist on the display" +msgstr "Eskatutako '%s' tekla ez da pantaila existitzen" + +#: openbox/xerror.c:39 +#, c-format +msgid "X Error: %s" +msgstr "X errorea: %s" From 9e9a7e124d1a80579281c5ab2ffc3574f38f9eba Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 09:46:07 -0500 Subject: [PATCH 06/79] allow dialog windows to be fullscreened, kpdf does this --- openbox/client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openbox/client.c b/openbox/client.c index d0fed545..1e2040fd 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1634,11 +1634,16 @@ void client_setup_decor_and_functions(ObClient *self, gboolean reconfig) switch (self->type) { case OB_CLIENT_TYPE_NORMAL: /* normal windows retain all of the possible decorations and - functionality, and are the only windows that you can fullscreen */ + functionality, and can be fullscreen */ self->functions |= OB_CLIENT_FUNC_FULLSCREEN; break; case OB_CLIENT_TYPE_DIALOG: + /* sometimes apps make dialog windows fullscreen for some reason (for + e.g. kpdf does this..) */ + self->functions |= OB_CLIENT_FUNC_FULLSCREEN; + break; + case OB_CLIENT_TYPE_UTILITY: /* these windows don't have anything added or removed by default */ break; From 44ee90c94623d37b3de3767233bc9cd38b670d34 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 10:00:58 -0500 Subject: [PATCH 07/79] Bug#: 3328 - remove top border for maxed undecorated windows --- openbox/frame.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openbox/frame.c b/openbox/frame.c index b10f793b..b49139ac 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -377,10 +377,12 @@ void frame_adjust_area(ObFrame *self, gboolean moved, STRUT_SET(self->size, self->cbwidth_l + (!self->max_horz ? self->bwidth : 0), - self->cbwidth_t + self->bwidth, + self->cbwidth_t + + (!self->max_horz || !self->max_vert || + !self->client->undecorated ? self->bwidth : 0), self->cbwidth_r + (!self->max_horz ? self->bwidth : 0), self->cbwidth_b + - (!self->max_horz || !self->max_vert ? self->bwidth : 0)); + (!self->max_horz || !self->max_vert ? self->bwidth : 0)); if (self->decorations & OB_FRAME_DECOR_TITLEBAR) self->size.top += ob_rr_theme->title_height + self->bwidth; From 103567be66c781dac459921454bfeebbd5751191 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 10:16:42 -0500 Subject: [PATCH 08/79] updated clearlooks theme from John McKnight --- themes/Clearlooks/openbox-3/themerc | 148 +++++++++++++++------------- 1 file changed, 78 insertions(+), 70 deletions(-) diff --git a/themes/Clearlooks/openbox-3/themerc b/themes/Clearlooks/openbox-3/themerc index e1dd9aa9..05e89229 100644 --- a/themes/Clearlooks/openbox-3/themerc +++ b/themes/Clearlooks/openbox-3/themerc @@ -2,117 +2,125 @@ # Author: John McKnight # Note: This is a port of the Clearlooks metacity theme to Openbox. -# Menu settings -menu.title.bg: Raised Gradient Vertical -menu.title.bg.color: #658fb5 -menu.title.bg.colorTo: #4d6982 +### Menu +#menu.border.color: #b5aa99 + +menu.title.bg: Flat Border Gradient Vertical +menu.title.bg.color: #589bda +menu.title.bg.colorTo: #3c7cb7 +menu.title.bg.border.color: #7cb6ec menu.title.text.color: #ffffff -menu.title.text.justify: Left +menu.title.text.justify: Center menu.items.bg: Flat Solid -menu.items.bg.color: #f8f5f2 +menu.items.bg.color: #fcfbfa menu.items.text.color: #000000 -menu.items.disabled.text.color: #aaaaaa +menu.items.disable.text.color: #b5b3ac menu.items.active.bg: Flat Gradient Vertical -menu.items.active.bg.color: #628cb2 -menu.items.active.bg.colorTo: #50708d +menu.items.active.bg.color: #5c9edb +menu.items.active.bg.colorTo: #4489ca menu.items.active.text.color: #ffffff -# Window settings (focused) -window.active.title.bg: Raised Gradient Vertical -window.active.title.bg.color: #658fb5 -window.active.title.bg.colorTo: #4d6982 +### Window active +window.active.title.bg: Flat Border Gradient Vertical +window.active.title.bg.color: #589bda +window.active.title.bg.colorTo: #3c7cb7 +window.active.title.bg.border.color: #7cb6ec +window.active.title.separator.color: #334c62 window.active.label.bg: Parentrelative window.active.label.text.color: #ffffff -window.active.handle.bg: Raised Gradient Vertical -window.active.handle.bg.color: #658fb5 -window.active.handle.bg.colorTo: #4d6982 +window.active.handle.bg: Flat Border Solid +window.active.handle.bg.color: #3c7cb7 +window.active.handle.bg.border.color: #7cb6ec -window.active.grip.bg: Raised Gradient Vertical -window.active.grip.bg.color: #658fb5 -window.active.grip.bg.colorTo: #4d6982 +window.active.grip.bg: Flat Border Solid +window.active.grip.bg.color: #3c7cb7 +window.active.grip.bg.border.color: #7cb6ec -window.active.button.unpressed.bg: Flat Gradient Vertical Border -window.active.button.unpressed.bg.color: #6993b9 -window.active.button.unpressed.bg.colorTo: #55799a -window.active.button.unpressed.bg.border.color: #3d4c5a +window.active.button.unpressed.bg: Flat Border Gradient Vertical +window.active.button.unpressed.bg.color: #5ea0dd +window.active.button.unpressed.bg.colorTo: #3f85c5 +window.active.button.unpressed.bg.border.color: #36536f window.active.button.unpressed.image.color: #ffffff -window.active.button.pressed.bg: Flat Gradient Vertical Border -window.active.button.pressed.bg.color: #537797 -window.active.button.pressed.bg.colorTo: #50708e -window.active.button.pressed.bg.border.color: #3d4c5a +window.active.button.pressed.bg: Flat Border Gradient Vertical +window.active.button.pressed.bg.color: #3c82c3 +window.active.button.pressed.bg.colorTo: #3c7ab5 +window.active.button.pressed.bg.border.color: #36536f window.active.button.pressed.image.color: #ffffff -window.active.button.disabled.bg: Flat Gradient Vertical Border -window.active.button.disabled.bg.color: #537797 -window.active.button.disabled.bg.colorTo: #50708e -window.active.button.disabled.bg.border.color: #3d4c5a -window.active.button.disabled.image.color: #3d4c5a +window.active.button.disabled.bg: Flat Border Gradient Vertical +window.active.button.disabled.bg.color: #3c82c3 +window.active.button.disabled.bg.colorTo: #3c7ab5 +window.active.button.disabled.bg.border.color: #36536f +window.active.button.disabled.image.color: #36536f -window.active.button.toggled.bg: Flat Gradient Vertical Border -window.active.button.toggled.bg.color: #6993b9 -window.active.button.toggled.bg.colorTo: #55799a -window.active.button.toggled.bg.border.color: #3d4c5a -window.active.button.toggled.image.color: #cccccc +window.active.button.toggled.bg: Flat Border Gradient Vertical +window.active.button.toggled.bg.color: #5ea0dd +window.active.button.toggled.bg.colorTo: #3f85c5 +window.active.button.toggled.bg.border.color: #36536f +window.active.button.toggled.image.color: #dcd4c9 -# Window settings (unfocused) -window.inactive.title.bg: Raised Gradient Vertical -window.inactive.title.bg.color: #f1eeea -window.inactive.title.bg.colorTo: #d8cfc7 +### Window inactive +window.inactive.border.color: #3d3a37 + +window.inactive.title.bg: Flat Border Gradient Vertical +window.inactive.title.bg.color: #efece6 +window.inactive.title.bg.colorTo: #d9d2c7 +window.inactive.title.bg.border.color: #ffffff +window.inactive.title.separator.color: #9a8e7c window.inactive.label.bg: Parentrelative window.inactive.label.text.color: #000000 -window.inactive.handle.bg: Raised Gradient Vertical -window.inactive.handle.bg.color: #f1eeea -window.inactive.handle.bg.colorTo: #d8cfc7 +window.inactive.handle.bg: Flat Border Solid +window.inactive.handle.bg.color: #d9d2c7 +window.inactive.handle.bg.border.color: #ffffff -window.inactive.grip.bg: Raised Gradient Vertical -window.inactive.grip.bg.color: #f1eeea -window.inactive.grip.bg.colorTo: #d8cfc7 +window.inactive.grip.bg: Flat Border Solid +window.inactive.grip.bg.color: #d9d2c7 +window.inactive.grip.bg.border.color: #ffffff -window.inactive.button.unpressed.bg: Flat Gradient Vertical Border -window.inactive.button.unpressed.bg.color: #efebe7 -window.inactive.button.unpressed.bg.colorTo: #ddd6ce -window.inactive.button.unpressed.bg.border.color: #8f8173 +window.inactive.button.unpressed.bg: Flat Border Gradient Vertical +window.inactive.button.unpressed.bg.color: #ede9e3 +window.inactive.button.unpressed.bg.colorTo: #dbd5ca +window.inactive.button.unpressed.bg.border.color: #8f8370 window.inactive.button.unpressed.image.color: #000000 -window.inactive.button.pressed.bg: Flat Gradient Vertical Border -window.inactive.button.pressed.bg.color: #efebe7 -window.inactive.button.pressed.bg.colorTo: #ddd6ce -window.inactive.button.pressed.bg.border.color: #8f8173 +window.inactive.button.pressed.bg: Flat Border Gradient Vertical +window.inactive.button.pressed.bg.color: #ede9e3 +window.inactive.button.pressed.bg.colorTo: #dbd5ca +window.inactive.button.pressed.bg.border.color: #8f8370 window.inactive.button.pressed.image.color: #000000 -window.inactive.button.disabled.bg: Flat Gradient Vertical Border -window.inactive.button.disabled.bg.color: #efebe7 -window.inactive.button.disabled.bg.colorTo: #ddd6ce -window.inactive.button.disabled.bg.border.color: #8f8173 -window.inactive.button.disabled.image.color: #8f8173 +window.inactive.button.disabled.bg: Flat Border Gradient Vertical +window.inactive.button.disabled.bg.color: #ede9e3 +window.inactive.button.disabled.bg.colorTo: #dbd5ca +window.inactive.button.disabled.bg.border.color: #8f8370 +window.inactive.button.disabled.image.color: #000000 -window.inactive.button.toggled.bg: Flat Gradient Vertical Border -window.inactive.button.toggled.bg.color: #efebe7 -window.inactive.button.toggled.bg.colorTo: #ddd6ce -window.inactive.button.toggled.bg.border.color: #8f8173 +window.inactive.button.toggled.bg: Flat Border Gradient Vertical +window.inactive.button.toggled.bg.color: #ede9e3 +window.inactive.button.toggled.bg.colorTo: #dbd5ca +window.inactive.button.toggled.bg.border.color: #8f8370 window.inactive.button.toggled.image.color: #000000 ### Everything else border.width: 1 padding.width: 2 -window.handle.width: 3 +window.handle.width: 4 window.client.padding.width: 0 -window.client.padding.height: 0 -border.color: #000000 +border.color: #1f252b menu.overlap: 0 ### Fonts -window.active.label.text.font:shadow=y:shadowtint=70:shadowoffset=1 -window.inactive.label.text.font:shadow=y:shadowtint=20:shadowoffset=1 +window.active.label.text.font: +window.inactive.label.text.font: menu.items.font: -menu.title.text.font:shadow=y:shadowtint=70 +menu.title.text.font: From 8a51893e8bf2192eec69eeed9bc49beb78e34312 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 11:21:00 -0500 Subject: [PATCH 09/79] Revert "fix for xkb weirdness, to fix a bug introduced in 3.4.3, where releasing the super mod key would not end interactive actions." This reverts commit 47e7aa82dc9f390c809151f87c81f33b5b408221. This is an XKB problem, and it needs to be properly resolved with XKB functions --- openbox/modkeys.c | 54 +++++++++-------------------------------------- 1 file changed, 10 insertions(+), 44 deletions(-) diff --git a/openbox/modkeys.c b/openbox/modkeys.c index c993cfc1..9e8da321 100644 --- a/openbox/modkeys.c +++ b/openbox/modkeys.c @@ -35,21 +35,7 @@ static void set_modkey_mask(guchar mask, KeySym sym); -/* This is 8 lists of keycodes that are bound to the given mod mask. - If contains more than the one given to us by X cuz XKB is weird apparently. - We will look up all keycodes for a given keysym that is bound to the mask, - and add them all here. - - With XKB, you can have a keycode bound to a modifier that isn't in the - modifier map somehow. So this means that when we try translate from the - KeyRelease to a mod mask, we are unable to. So this array stores *all* - the KeyCodes for each KeySym for each KeyCode bound to a mod mask. - Confused? Haha... - - ModMask -> n KeyCodes -> n*m KeySyms (up to m for each KeyCode) -> - n*m*p KeyCodes (up to p for each KeySym) -*/ -static GArray *modmap[NUM_MASKS]; +static XModifierKeymap *modmap; static KeySym *keymap; static gint min_keycode, max_keycode, keysyms_per_keycode; /* This is a bitmask of the different masks for each modifier key */ @@ -62,15 +48,14 @@ static gboolean hyper_l = FALSE; void modkeys_startup(gboolean reconfigure) { - static XModifierKeymap *xmodmap; - gint i, j, k, l, m; + gint i, j, k; /* reset the keys to not be bound to any masks */ for (i = 0; i < OB_MODKEY_NUM_KEYS; ++i) modkeys_keys[i] = 0; - xmodmap = XGetModifierMapping(ob_display); - g_assert(xmodmap->max_keypermod > 0); + modmap = XGetModifierMapping(ob_display); + g_assert(modmap->max_keypermod > 0); XDisplayKeycodes(ob_display, &min_keycode, &max_keycode); keymap = XGetKeyboardMapping(ob_display, min_keycode, @@ -81,31 +66,17 @@ void modkeys_startup(gboolean reconfigure) /* go through each of the modifier masks (eg ShiftMask, CapsMask...) */ for (i = 0; i < NUM_MASKS; ++i) { - /* reset the modmap list */ - modmap[i] = g_array_new(FALSE, FALSE, sizeof(KeyCode)); - /* go through each keycode that is bound to the mask */ - for (j = 0; j < xmodmap->max_keypermod; ++j) { + for (j = 0; j < modmap->max_keypermod; ++j) { KeySym sym; /* get a keycode that is bound to the mask (i) */ - KeyCode keycode = xmodmap->modifiermap[i*xmodmap->max_keypermod+j]; + KeyCode keycode = modmap->modifiermap[i*modmap->max_keypermod + j]; if (keycode) { /* go through each keysym bound to the given keycode */ for (k = 0; k < keysyms_per_keycode; ++k) { sym = keymap[(keycode-min_keycode) * keysyms_per_keycode + k]; if (sym != NoSymbol) { - /* find all keycodes for the given keysym */ - for (l = min_keycode; l <= max_keycode; ++l) - for (m = 0; m < keysyms_per_keycode; ++m) - if (keymap[(l-min_keycode) * - keysyms_per_keycode + m] == sym) - { - /* add all keycodes for the keysym to our - modmap */ - g_array_append_val(modmap[i], l); - } - /* bind the key to the mask (e.g. Alt_L => Mod1Mask) */ set_modkey_mask(nth_mask(i), sym); } @@ -118,22 +89,17 @@ void modkeys_startup(gboolean reconfigure) modkeys_keys[OB_MODKEY_KEY_CAPSLOCK] = LockMask; modkeys_keys[OB_MODKEY_KEY_SHIFT] = ShiftMask; modkeys_keys[OB_MODKEY_KEY_CONTROL] = ControlMask; - - XFreeModifiermap(xmodmap); } void modkeys_shutdown(gboolean reconfigure) { - guint i; - - for (i = 0; i < NUM_MASKS; ++i) - g_array_free(modmap[i], TRUE); + XFreeModifiermap(modmap); XFree(keymap); } guint modkeys_keycode_to_mask(guint keycode) { - guint i, j; + gint i, j; guint mask = 0; if (keycode == NoSymbol) return 0; @@ -141,9 +107,9 @@ guint modkeys_keycode_to_mask(guint keycode) /* go through each of the modifier masks (eg ShiftMask, CapsMask...) */ for (i = 0; i < NUM_MASKS; ++i) { /* go through each keycode that is bound to the mask */ - for (j = 0; j < modmap[i]->len; ++j) { + for (j = 0; j < modmap->max_keypermod; ++j) { /* compare with a keycode that is bound to the mask (i) */ - if (g_array_index(modmap[i], KeyCode, j) == keycode) + if (modmap->modifiermap[i*modmap->max_keypermod + j] == keycode) mask |= nth_mask(i); } } From 5a468756c07a43e0ee7fa4e406847c86db09834a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 11:42:09 -0500 Subject: [PATCH 10/79] reconfigure openbox when the input mapping changes, eg. keyboard layout or modifier map --- openbox/event.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openbox/event.c b/openbox/event.c index 5e44bc9f..41bcd350 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -619,6 +619,11 @@ static void event_process(const XEvent *ec, gpointer data) event_handle_root(e); else if (e->type == MapRequest) client_manage(window); + else if (e->type == MappingNotify) { + /* keyboard layout changes, reconfigure openbox. need to restart the + modkeys system, but also to reload the key bindings. */ + ob_reconfigure(); + } else if (e->type == ClientMessage) { /* This is for _NET_WM_REQUEST_FRAME_EXTENTS messages. They come for windows that are not managed yet. */ From 162a97e158e0dfa774754aee5198786907f9453b Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 13:05:11 -0500 Subject: [PATCH 11/79] XKB modifiers are strange things, and i don't know how to read them properly in modkeys.c and convert it all to the x core stuff. so we use this to get the state of the modifiers, otherwise we end up missing them sometimes (like on PPC) --- openbox/event.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index 41bcd350..0c97bd93 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -247,6 +247,10 @@ static void event_set_curtime(XEvent *e) static void event_hack_mods(XEvent *e) { +#ifdef XKB + XkbStateRec xkb_state; +#endif + switch (e->type) { case ButtonPress: case ButtonRelease: @@ -256,10 +260,22 @@ static void event_hack_mods(XEvent *e) e->xkey.state = modkeys_only_modifier_masks(e->xkey.state); break; case KeyRelease: - e->xkey.state = modkeys_only_modifier_masks(e->xkey.state); - /* remove from the state the mask of the modifier key being released, - if it is a modifier key being released that is */ - e->xkey.state &= ~modkeys_keycode_to_mask(e->xkey.keycode); +#ifdef XKB + /* If XKB is present, then the modifiers are all strange from its + magic. Our X core protocol stuff won't work, so we use this to + find what the modifier state is instead. */ + if (XkbGetState(ob_display, XkbUseCoreKbd, &xkb_state) == Success) { + e->xkey.state = xkb_state.compat_state; + break; + } + else +#endif + { + e->xkey.state = modkeys_only_modifier_masks(e->xkey.state); + /* remove from the state the mask of the modifier key being + released, if it is a modifier key being released that is */ + e->xkey.state &= ~modkeys_keycode_to_mask(e->xkey.keycode); + } break; case MotionNotify: e->xmotion.state = modkeys_only_modifier_masks(e->xmotion.state); From b447f16f6080e1a92c3ea6a5848609a7a96ea3ce Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 13:06:37 -0500 Subject: [PATCH 12/79] code clean up --- openbox/event.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index 0c97bd93..e3214a7a 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -264,10 +264,8 @@ static void event_hack_mods(XEvent *e) /* If XKB is present, then the modifiers are all strange from its magic. Our X core protocol stuff won't work, so we use this to find what the modifier state is instead. */ - if (XkbGetState(ob_display, XkbUseCoreKbd, &xkb_state) == Success) { + if (XkbGetState(ob_display, XkbUseCoreKbd, &xkb_state) == Success) e->xkey.state = xkb_state.compat_state; - break; - } else #endif { From 0ce14a727968736e57fb3fabba3794b46903875f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 14:40:58 -0500 Subject: [PATCH 13/79] fix a focus race condition in two ways: 1. when focusing a window, ignore any enter events up until the serial of the X event causing the focus, not up until the last thing sent to the server. if we get 2 enters very quickly, then we don't want to ignore the second one just because we are focusing the first window. 2. there is a race if you check (focus_client != d->client) in the delay_focus_func, because the current focused window might change by the time this focus_client would take effect, so don't check that. --- openbox/event.c | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index e3214a7a..03229117 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -91,6 +91,7 @@ static void event_handle_dockapp(ObDockApp *app, XEvent *e); static void event_handle_client(ObClient *c, XEvent *e); static void event_handle_user_input(ObClient *client, XEvent *e); static gboolean is_enter_focus_event_ignored(XEvent *e); +static void event_ignore_enter_range(gulong start, gulong end); static void focus_delay_dest(gpointer data); static gboolean focus_delay_cmp(gconstpointer d1, gconstpointer d2); @@ -99,6 +100,8 @@ static void focus_delay_client_dest(ObClient *client, gpointer data); Time event_curtime = CurrentTime; Time event_last_user_time = CurrentTime; +/*! The serial of the current X event */ +gulong event_curserial; static gboolean focus_left_screen = FALSE; /*! A list of ObSerialRanges which are to be ignored for mouse enter events */ @@ -243,6 +246,7 @@ static void event_set_curtime(XEvent *e) event_last_user_time = CurrentTime; event_curtime = t; + event_curserial = 0; } static void event_hack_mods(XEvent *e) @@ -479,6 +483,7 @@ static void event_process(const XEvent *ec, gpointer data) } event_set_curtime(e); + event_curserial = e->xany.serial; event_hack_mods(e); if (event_ignore(e, client)) { if (ed) @@ -1010,18 +1015,23 @@ static void event_handle_client(ObClient *client, XEvent *e) is_enter_focus_event_ignored(e)) { ob_debug_type(OB_DEBUG_FOCUS, - "%sNotify mode %d detail %d on %lx IGNORED\n", + "%sNotify mode %d detail %d serial %lu on %lx " + "IGNORED\n", (e->type == EnterNotify ? "Enter" : "Leave"), e->xcrossing.mode, - e->xcrossing.detail, client?client->window:0); + e->xcrossing.detail, + e->xcrossing.serial, + client?client->window:0); } else { ob_debug_type(OB_DEBUG_FOCUS, - "%sNotify mode %d detail %d on %lx, " + "%sNotify mode %d detail %d serial %lu on %lx, " "focusing window\n", (e->type == EnterNotify ? "Enter" : "Leave"), e->xcrossing.mode, - e->xcrossing.detail, (client?client->window:0)); + e->xcrossing.detail, + e->xcrossing.serial, + (client?client->window:0)); if (config_focus_follow) event_enter_client(client); } @@ -1864,10 +1874,8 @@ static gboolean focus_delay_func(gpointer data) if (menu_frame_visible || moveresize_in_progress) return FALSE; event_curtime = d->time; - if (focus_client != d->client) { - if (client_focus(d->client) && config_focus_raise) - stacking_raise(CLIENT_AS_WINDOW(d->client)); - } + if (client_focus(d->client) && config_focus_raise) + stacking_raise(CLIENT_AS_WINDOW(d->client)); event_curtime = old; return FALSE; /* no repeat */ } @@ -1878,35 +1886,44 @@ static void focus_delay_client_dest(ObClient *client, gpointer data) client, FALSE); } -void event_halt_focus_delay(void) +void event_halt_focus_delay(gulong serial) { - /* ignore all enter events up till now */ - event_end_ignore_all_enters(1); + /* ignore all enter events up till the event which caused this to occur */ + if (event_curserial) event_ignore_enter_range(1, event_curserial); ob_main_loop_timeout_remove(ob_main_loop, focus_delay_func); } gulong event_start_ignore_all_enters(void) { + /* increment the serial so we don't ignore events we weren't meant to */ XSync(ob_display, FALSE); return LastKnownRequestProcessed(ob_display); } -void event_end_ignore_all_enters(gulong start) +static void event_ignore_enter_range(gulong start, gulong end) { ObSerialRange *r; g_assert(start != 0); - XSync(ob_display, FALSE); + g_assert(end != 0); r = g_new(ObSerialRange, 1); r->start = start; - r->end = LastKnownRequestProcessed(ob_display); + r->end = end; ignore_serials = g_slist_prepend(ignore_serials, r); + ob_debug_type(OB_DEBUG_FOCUS, "ignoring enters from %lu until %lu\n", + r->start, r->end); + /* increment the serial so we don't ignore events we weren't meant to */ XSync(ob_display, FALSE); } +void event_end_ignore_all_enters(gulong start) +{ + event_ignore_enter_range(start, LastKnownRequestProcessed(ob_display)); +} + static gboolean is_enter_focus_event_ignored(XEvent *e) { GSList *it, *next; From fb1d6d9e468f66c047c80b8f4bd66a9f270c624a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 14:48:21 -0500 Subject: [PATCH 14/79] Bug 3359 - redundant pango flags --- render/obrender-3.0.pc.in | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/render/obrender-3.0.pc.in b/render/obrender-3.0.pc.in index 68e54cb7..ebb17ef3 100644 --- a/render/obrender-3.0.pc.in +++ b/render/obrender-3.0.pc.in @@ -6,12 +6,9 @@ includedir=@includedir@ xcflags=@X_CFLAGS@ xlibs=@X_LIBS@ -pangocflags=@PANGO_CFLAGS@ -pangolibs=@PANGO_LIBS@ - Name: ObRender Description: Openbox Render Library Version: @VERSION@ Requires: obparser-3.0 glib-2.0 xft pangoxft -Libs: -L${libdir} -lobrender ${xlibs} ${pangolibs} -Cflags: -I${includedir}/openbox/@OB_VERSION@ ${xcflags} ${pangocflags} +Libs: -L${libdir} -lobrender ${xlibs} +Cflags: -I${includedir}/openbox/@OB_VERSION@ ${xcflags} From 1cb287e130ee662002baeec809c42498da38b878 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 15:01:03 -0500 Subject: [PATCH 15/79] focus the desktop window when you right click it, same as you focus other windows --- data/rc.xml | 4 ++++ doc/rc-mouse-focus.xml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/data/rc.xml b/data/rc.xml index 3859f537..e3a59eb2 100644 --- a/data/rc.xml +++ b/data/rc.xml @@ -569,6 +569,10 @@ + + + + diff --git a/doc/rc-mouse-focus.xml b/doc/rc-mouse-focus.xml index a8a888be..0e71c03c 100644 --- a/doc/rc-mouse-focus.xml +++ b/doc/rc-mouse-focus.xml @@ -516,6 +516,9 @@ + + + From 1789d4564514c4cefe3d2e9d2b7b65119784b53c Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 15:18:04 -0500 Subject: [PATCH 16/79] fix a warning from crappy libc apis --- openbox/openbox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openbox/openbox.c b/openbox/openbox.c index 6f47fbd0..ff226af4 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -512,7 +512,9 @@ static void remove_args(gint *argc, gchar **argv, gint index, gint num) static void parse_env() { /* unset this so we don't pass it on unknowingly */ - putenv("DESKTOP_STARTUP_ID"); + gchar *s = g_strdup("DESKTOP_STARTUP_ID"); + putenv(s); + g_free(s); } static void parse_args(gint *argc, gchar **argv) From abc67cbdc1c1e61e074f8f312eaecb357cd0aa5c Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 15:28:26 -0500 Subject: [PATCH 17/79] make it possible to temporarily raise a window to the top, and restore it. also fix the return val for window_layer. --- openbox/actions/lower.c | 1 + openbox/actions/raise.c | 1 + openbox/client.h | 1 + openbox/stacking.c | 36 ++++++++++++++++++++++++++++++++++++ openbox/stacking.h | 21 ++++++++++++++------- openbox/window.c | 2 +- openbox/window.h | 4 +++- 7 files changed, 57 insertions(+), 9 deletions(-) diff --git a/openbox/actions/lower.c b/openbox/actions/lower.c index 3a214ea7..d34e933b 100644 --- a/openbox/actions/lower.c +++ b/openbox/actions/lower.c @@ -1,5 +1,6 @@ #include "openbox/actions.h" #include "openbox/stacking.h" +#include "openbox/window.h" static gboolean run_func(ObActionsData *data, gpointer options); diff --git a/openbox/actions/raise.c b/openbox/actions/raise.c index 5dfe281a..6837bce2 100644 --- a/openbox/actions/raise.c +++ b/openbox/actions/raise.c @@ -1,5 +1,6 @@ #include "openbox/actions.h" #include "openbox/stacking.h" +#include "openbox/window.h" static gboolean run_func(ObActionsData *data, gpointer options); diff --git a/openbox/client.h b/openbox/client.h index b4b165f8..e83a6b7a 100644 --- a/openbox/client.h +++ b/openbox/client.h @@ -24,6 +24,7 @@ #include "mwm.h" #include "geom.h" #include "stacking.h" +#include "window.h" #include "render/color.h" #include diff --git a/openbox/stacking.c b/openbox/stacking.c index b23e6eac..bb8975d4 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -105,6 +105,42 @@ static void do_restack(GList *wins, GList *before) stacking_set_list(); } +void stacking_temp_raise(ObWindow *window) +{ + Window win[2]; + GList *it; + + /* don't use this for internal windows..! it would lower them.. */ + g_assert(window_layer(window) < OB_STACKING_LAYER_INTERNAL); + + /* find the window to drop it underneath */ + win[0] = screen_support_win; + for (it = stacking_list; it; it = g_list_next(it)) { + ObWindow *w = it->data; + if (window_layer(w) >= OB_STACKING_LAYER_INTERNAL) + win[0] = window_top(w); + else + break; + } + + win[1] = window_top(window); + XRestackWindows(ob_display, win, 2); +} + +void stacking_restore() +{ + Window *win; + GList *it; + gint i; + + win = g_new(Window, g_list_length(stacking_list) + 1); + win[0] = screen_support_win; + for (i = 1, it = stacking_list; it; ++i, it = g_list_next(it)) + win[i] = window_top(it->data); + XRestackWindows(ob_display, win, i); + g_free(win); +} + static void do_raise(GList *wins) { GList *it; diff --git a/openbox/stacking.h b/openbox/stacking.h index ac9c8239..e226f36f 100644 --- a/openbox/stacking.h +++ b/openbox/stacking.h @@ -20,11 +20,12 @@ #ifndef __stacking_h #define __stacking_h -#include "window.h" - #include #include +struct _ObWindow; +struct _ObClient; + /*! The possible stacking layers a client window can be a part of */ typedef enum { OB_STACKING_LAYER_INVALID, @@ -44,21 +45,27 @@ extern GList *stacking_list; stacking_list */ void stacking_set_list(); -void stacking_add(ObWindow *win); -void stacking_add_nonintrusive(ObWindow *win); +void stacking_add(struct _ObWindow *win); +void stacking_add_nonintrusive(struct _ObWindow *win); #define stacking_remove(win) stacking_list = g_list_remove(stacking_list, win); /*! Raises a window above all others in its stacking layer */ -void stacking_raise(ObWindow *window); +void stacking_raise(struct _ObWindow *window); + +/*! Temporarily raises a window above all others */ +void stacking_temp_raise(struct _ObWindow *window); + +/*! Restores any temporarily raised windows to their correct place */ +void stacking_restore(); /*! Lowers a window below all others in its stacking layer */ -void stacking_lower(ObWindow *window); +void stacking_lower(struct _ObWindow *window); /*! Moves a window below another if its in the same layer. This function does not enforce stacking rules IRT transients n such, and so it should really ONLY be used to restore stacking orders from saved sessions */ -void stacking_below(ObWindow *window, ObWindow *below); +void stacking_below(struct _ObWindow *window, struct _ObWindow *below); /*! Restack a window based upon a sibling (or all windows) in various ways. @param client The client to be restacked diff --git a/openbox/window.c b/openbox/window.c index 19b39c09..c5e6a4ea 100644 --- a/openbox/window.c +++ b/openbox/window.c @@ -63,7 +63,7 @@ Window window_top(ObWindow *self) return None; } -Window window_layer(ObWindow *self) +ObStackingLayer window_layer(ObWindow *self) { switch (self->type) { case Window_Menu: diff --git a/openbox/window.h b/openbox/window.h index ef29edd7..aaf83995 100644 --- a/openbox/window.h +++ b/openbox/window.h @@ -19,6 +19,8 @@ #ifndef __window_h #define __window_h +#include "stacking.h" + #include #include @@ -74,6 +76,6 @@ void window_startup(gboolean reconfig); void window_shutdown(gboolean reconfig); Window window_top(ObWindow *self); -Window window_layer(ObWindow *self); +ObStackingLayer window_layer(ObWindow *self); #endif From 746015e88c51dda43b26f35abc25050c502d319b Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 15:36:31 -0500 Subject: [PATCH 18/79] make backport closer to 3.4-working for merging purposes --- openbox/actions/cyclewindows.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index 965ac993..285df370 100644 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@ -178,8 +178,7 @@ static void end_cycle(gboolean cancel, guint state, Options *o) TRUE, cancel); cycling = FALSE; - if (ft) { + if (ft) actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY, state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft); - } } From ea371936cec5f1e7f0eaed698b2cff6fab42f210 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 16:11:51 -0500 Subject: [PATCH 19/79] let you raise the focus target temporarily during focus cycling, with the option. also a new option lets you turn off the indicator bar --- openbox/actions/cyclewindows.c | 33 +++++++++++++++++++++------- openbox/actions/directionalwindows.c | 33 +++++++++++++++++++++------- openbox/focus_cycle.c | 13 ++++++----- openbox/focus_cycle.h | 4 +++- openbox/focus_cycle_indicator.c | 12 ++++++++-- 5 files changed, 70 insertions(+), 25 deletions(-) diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index 285df370..059db93f 100644 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@ -1,4 +1,6 @@ #include "openbox/actions.h" +#include "openbox/stacking.h" +#include "openbox/window.h" #include "openbox/event.h" #include "openbox/focus_cycle.h" #include "openbox/openbox.h" @@ -11,6 +13,8 @@ typedef struct { gboolean desktop_windows; gboolean all_desktops; gboolean forward; + gboolean bar; + gboolean raise; GSList *actions; } Options; @@ -46,11 +50,16 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) o = g_new0(Options, 1); o->dialog = TRUE; + o->bar = TRUE; if ((n = parse_find_node("linear", node))) o->linear = parse_bool(doc, n); if ((n = parse_find_node("dialog", node))) o->dialog = parse_bool(doc, n); + if ((n = parse_find_node("bar", node))) + o->bar = parse_bool(doc, n); + if ((n = parse_find_node("raise", node))) + o->raise = parse_bool(doc, n); if ((n = parse_find_node("panels", node))) o->dock_windows = parse_bool(doc, n); if ((n = parse_find_node("desktop", node))) @@ -111,17 +120,22 @@ static void free_func(gpointer options) static gboolean run_func(ObActionsData *data, gpointer options) { Options *o = options; + struct _ObClient *ft; - focus_cycle(o->forward, - o->all_desktops, - o->dock_windows, - o->desktop_windows, - o->linear, - TRUE, - o->dialog, - FALSE, FALSE); + ft = focus_cycle(o->forward, + o->all_desktops, + o->dock_windows, + o->desktop_windows, + o->linear, + TRUE, + o->bar, + o->dialog, + FALSE, FALSE); cycling = TRUE; + stacking_restore(); + if (o->raise) stacking_temp_raise(CLIENT_AS_WINDOW(ft)); + return TRUE; } @@ -174,6 +188,7 @@ static void end_cycle(gboolean cancel, guint state, Options *o) o->desktop_windows, o->linear, TRUE, + o->bar, o->dialog, TRUE, cancel); cycling = FALSE; @@ -181,4 +196,6 @@ static void end_cycle(gboolean cancel, guint state, Options *o) if (ft) actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY, state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft); + + stacking_restore(); } diff --git a/openbox/actions/directionalwindows.c b/openbox/actions/directionalwindows.c index 707659eb..c575d84e 100644 --- a/openbox/actions/directionalwindows.c +++ b/openbox/actions/directionalwindows.c @@ -1,5 +1,7 @@ #include "openbox/actions.h" #include "openbox/event.h" +#include "openbox/stacking.h" +#include "openbox/window.h" #include "openbox/focus_cycle.h" #include "openbox/openbox.h" #include "openbox/misc.h" @@ -11,6 +13,8 @@ typedef struct { gboolean dock_windows; gboolean desktop_windows; ObDirection direction; + gboolean bar; + gboolean raise; GSList *actions; } Options; @@ -46,9 +50,14 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) o = g_new0(Options, 1); o->dialog = TRUE; + o->bar = TRUE; if ((n = parse_find_node("dialog", node))) o->dialog = parse_bool(doc, n); + if ((n = parse_find_node("bar", node))) + o->bar = parse_bool(doc, n); + if ((n = parse_find_node("raise", node))) + o->raise = parse_bool(doc, n); if ((n = parse_find_node("panels", node))) o->dock_windows = parse_bool(doc, n); if ((n = parse_find_node("desktop", node))) @@ -135,13 +144,19 @@ static gboolean run_func(ObActionsData *data, gpointer options) if (!o->interactive) end_cycle(FALSE, data->state, o); else { - focus_directional_cycle(o->direction, - o->dock_windows, - o->desktop_windows, - TRUE, - o->dialog, - FALSE, FALSE); + struct _ObClient *ft; + + ft = focus_directional_cycle(o->direction, + o->dock_windows, + o->desktop_windows, + TRUE, + o->bar, + o->dialog, + FALSE, FALSE); cycling = TRUE; + + stacking_restore(); + if (o->raise) stacking_temp_raise(CLIENT_AS_WINDOW(ft)); } return o->interactive; @@ -194,12 +209,14 @@ static void end_cycle(gboolean cancel, guint state, Options *o) o->dock_windows, o->desktop_windows, o->interactive, + o->bar, o->dialog, TRUE, cancel); cycling = FALSE; - if (ft) { + if (ft) actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY, state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft); - } + + stacking_restore(); } diff --git a/openbox/focus_cycle.c b/openbox/focus_cycle.c index 85cdf480..2348f8d0 100644 --- a/openbox/focus_cycle.c +++ b/openbox/focus_cycle.c @@ -62,15 +62,16 @@ void focus_cycle_stop(ObClient *ifclient) focus_cycle_dock_windows, focus_cycle_desktop_windows)) { - focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); - focus_directional_cycle(0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); + focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,TRUE); + focus_directional_cycle(0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); } } ObClient* focus_cycle(gboolean forward, gboolean all_desktops, gboolean dock_windows, gboolean desktop_windows, gboolean linear, gboolean interactive, - gboolean dialog, gboolean done, gboolean cancel) + gboolean showbar, gboolean dialog, + gboolean done, gboolean cancel) { static ObClient *t = NULL; static GList *order = NULL; @@ -128,7 +129,7 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops, if (interactive) { if (ft != focus_cycle_target) { /* prevents flicker */ focus_cycle_target = ft; - focus_cycle_draw_indicator(ft); + focus_cycle_draw_indicator(showbar ? ft : NULL); } if (dialog) /* same arguments as focus_target_valid */ @@ -261,7 +262,7 @@ static ObClient *focus_find_directional(ObClient *c, ObDirection dir, ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows, gboolean desktop_windows, gboolean interactive, - gboolean dialog, + gboolean showbar, gboolean dialog, gboolean done, gboolean cancel) { static ObClient *first = NULL; @@ -307,7 +308,7 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows, focus_cycle_target = ft; if (!interactive) goto done_cycle; - focus_cycle_draw_indicator(ft); + focus_cycle_draw_indicator(showbar ? ft : NULL); } if (focus_cycle_target && dialog) /* same arguments as focus_target_valid */ diff --git a/openbox/focus_cycle.h b/openbox/focus_cycle.h index 68b8d929..6e1c2c9d 100644 --- a/openbox/focus_cycle.h +++ b/openbox/focus_cycle.h @@ -37,11 +37,13 @@ void focus_cycle_shutdown(gboolean reconfig); struct _ObClient* focus_cycle(gboolean forward, gboolean all_desktops, gboolean dock_windows, gboolean desktop_windows, gboolean linear, gboolean interactive, - gboolean dialog, gboolean done, gboolean cancel); + gboolean showbar, gboolean dialog, + gboolean done, gboolean cancel); struct _ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows, gboolean desktop_windows, gboolean interactive, + gboolean showbar, gboolean dialog, gboolean done, gboolean cancel); diff --git a/openbox/focus_cycle_indicator.c b/openbox/focus_cycle_indicator.c index 79071314..5a6a1029 100644 --- a/openbox/focus_cycle_indicator.c +++ b/openbox/focus_cycle_indicator.c @@ -39,6 +39,7 @@ struct static RrAppearance *a_focus_indicator; static RrColor *color_white; +static gboolean visible; static Window create_window(Window parent, gulong mask, XSetWindowAttributes *attrib) @@ -53,6 +54,8 @@ void focus_cycle_indicator_startup(gboolean reconfig) { XSetWindowAttributes attr; + visible = FALSE; + if (reconfig) return; focus_indicator.top.obwin.type = Window_Internal; @@ -118,7 +121,7 @@ void focus_cycle_indicator_shutdown(gboolean reconfig) void focus_cycle_draw_indicator(ObClient *c) { - if (!c) { + if (!c && visible) { gulong ignore_start; /* kill enter events cause by this unmapping */ @@ -130,7 +133,10 @@ void focus_cycle_draw_indicator(ObClient *c) XUnmapWindow(ob_display, focus_indicator.bottom.win); event_end_ignore_all_enters(ignore_start); - } else { + + visible = FALSE; + } + else if (c) { /* if (c) frame_adjust_focus(c->frame, FALSE); @@ -249,5 +255,7 @@ void focus_cycle_draw_indicator(ObClient *c) XMapWindow(ob_display, focus_indicator.left.win); XMapWindow(ob_display, focus_indicator.right.win); XMapWindow(ob_display, focus_indicator.bottom.win); + + visible = TRUE; } } From 22c102572e892dc36b1c411edbd70415efe1f0e6 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 16:26:16 -0500 Subject: [PATCH 20/79] fix a crash when reconfiguring during focus cycling --- openbox/focus_cycle_popup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c index 488ecce1..028fa45d 100644 --- a/openbox/focus_cycle_popup.c +++ b/openbox/focus_cycle_popup.c @@ -146,6 +146,7 @@ void focus_cycle_popup_shutdown(gboolean reconfig) } g_free(popup.hilite_rgba); + popup.hilite_rgba = NULL; XDestroyWindow(ob_display, popup.text); XDestroyWindow(ob_display, popup.bg); From e61f58462fe0cdd85090b621c6906b2885990071 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 16:29:11 -0500 Subject: [PATCH 21/79] freeze onscreen stacking order changes while a temp raise for focus cycling is occuring --- openbox/stacking.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/openbox/stacking.c b/openbox/stacking.c index bb8975d4..34ab0588 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -28,6 +28,10 @@ #include "debug.h" GList *stacking_list = NULL; +/*! When true, stacking changes will not be reflected on the screen. This is + to freeze the on-screen stacking order while a window is being temporarily + raised during focus cycling */ +gboolean pause_changes = FALSE; void stacking_set_list(void) { @@ -99,7 +103,8 @@ static void do_restack(GList *wins, GList *before) } #endif - XRestackWindows(ob_display, win, i); + if (!pause_changes) + XRestackWindows(ob_display, win, i); g_free(win); stacking_set_list(); @@ -125,6 +130,8 @@ void stacking_temp_raise(ObWindow *window) win[1] = window_top(window); XRestackWindows(ob_display, win, 2); + + pause_changes = TRUE; } void stacking_restore() @@ -139,6 +146,8 @@ void stacking_restore() win[i] = window_top(it->data); XRestackWindows(ob_display, win, i); g_free(win); + + pause_changes = FALSE; } static void do_raise(GList *wins) From b3764dd433f8e8511bf3045e4ea5e0e5df6b2a70 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 5 Jan 2008 12:40:46 +0100 Subject: [PATCH 22/79] Don't record desktops for lastdesktop when switching away quickly again. When switching desktops, only record the previous desktop as the last desktop if the user stayed there for a while. This way you can scroll over a couple desktops quickly, then go back to the previous desktop you _used_, not the last you scrolled past. --- openbox/screen.c | 50 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/openbox/screen.c b/openbox/screen.c index a8da15c0..e81b9590 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -59,7 +59,9 @@ static void screen_fallback_focus(void); guint screen_num_desktops; guint screen_num_monitors; guint screen_desktop; -guint screen_last_desktop; +guint screen_last_desktop = 1; +guint screen_old_desktop; +gboolean screen_desktop_timeout = TRUE; Size screen_physical_size; gboolean screen_showing_desktop; ObDesktopLayout screen_desktop_layout; @@ -577,23 +579,61 @@ static void screen_fallback_focus(void) } } +static gboolean last_desktop_func(gpointer data) +{ + screen_desktop_timeout = TRUE; + return FALSE; +} + void screen_set_desktop(guint num, gboolean dofocus) { GList *it; - guint old; + guint previous; gulong ignore_start; g_assert(num < screen_num_desktops); - old = screen_desktop; + previous = screen_desktop; screen_desktop = num; - if (old == num) return; + if (previous == num) return; PROP_SET32(RootWindow(ob_display, ob_screen), net_current_desktop, cardinal, num); - screen_last_desktop = old; + if (screen_desktop_timeout) { + if (screen_desktop == screen_last_desktop) { + screen_last_desktop = previous; + screen_old_desktop = screen_desktop; + } else { + screen_old_desktop = screen_last_desktop; + screen_last_desktop = previous; + } + } else { + if (screen_desktop == screen_last_desktop) { + if (previous == screen_old_desktop) { + screen_last_desktop = screen_old_desktop; + } else if (screen_last_desktop == screen_old_desktop) { + screen_last_desktop = previous; + } else { + screen_last_desktop = screen_old_desktop; + } + } else { + if (screen_desktop == screen_old_desktop) { + /* do nothing */ + } else if (previous == screen_old_desktop) { + /* do nothing */ + } else if (screen_last_desktop == screen_old_desktop) { + screen_last_desktop = previous; + } else { + /* do nothing */ + } + } + } + screen_desktop_timeout = FALSE; + ob_main_loop_timeout_remove(ob_main_loop, last_desktop_func); + ob_main_loop_timeout_add(ob_main_loop, 500000, last_desktop_func, + NULL, NULL, NULL); ob_debug("Moving to desktop %d\n", num+1); From 8a2adbb0585dfc150c4809327a2c41265174b533 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 16:49:55 -0500 Subject: [PATCH 23/79] make the time to remember last desktop a #define, and make it 750ms --- openbox/screen.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openbox/screen.c b/openbox/screen.c index e81b9590..5e0f67d4 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -79,6 +79,10 @@ static GSList *struts_bottom = NULL; static ObPagerPopup *desktop_popup; +/*! The number of microseconds that you need to be on a desktop before it will + replace the remembered "last desktop" */ +#define REMEMBER_LAST_DESKTOP_TIME 750000 + static gboolean replace_wm(void) { gchar *wm_sn; @@ -632,8 +636,8 @@ void screen_set_desktop(guint num, gboolean dofocus) } screen_desktop_timeout = FALSE; ob_main_loop_timeout_remove(ob_main_loop, last_desktop_func); - ob_main_loop_timeout_add(ob_main_loop, 500000, last_desktop_func, - NULL, NULL, NULL); + ob_main_loop_timeout_add(ob_main_loop, REMEMBER_LAST_DESKTOP_TIME, + last_desktop_func, NULL, NULL, NULL); ob_debug("Moving to desktop %d\n", num+1); From 6133bbd5f732622d8d5650d262413429c38af842 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 17:24:13 -0500 Subject: [PATCH 24/79] try to comment the code for when to save the "last desktop" --- openbox/screen.c | 69 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/openbox/screen.c b/openbox/screen.c index 5e0f67d4..379a12d8 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -605,32 +605,61 @@ void screen_set_desktop(guint num, gboolean dofocus) PROP_SET32(RootWindow(ob_display, ob_screen), net_current_desktop, cardinal, num); + /* This whole thing decides when/how to save the screen_last_desktop so + that it can be restored later if you want */ if (screen_desktop_timeout) { + /* If screen_desktop_timeout is true, then we've been on this desktop + long enough and we can save it as the last desktop. */ + + /* save the "last desktop" as the "old desktop" */ + screen_old_desktop = screen_last_desktop; + /* save the desktop we're coming from as the "last desktop" */ + screen_last_desktop = previous; + } + else { + /* If screen_desktop_timeout is false, then we just got to this desktop + and we are moving away again. */ + if (screen_desktop == screen_last_desktop) { - screen_last_desktop = previous; - screen_old_desktop = screen_desktop; - } else { - screen_old_desktop = screen_last_desktop; - screen_last_desktop = previous; - } - } else { - if (screen_desktop == screen_last_desktop) { + /* If we are moving to the "last desktop" .. */ if (previous == screen_old_desktop) { - screen_last_desktop = screen_old_desktop; - } else if (screen_last_desktop == screen_old_desktop) { - screen_last_desktop = previous; - } else { + /* .. from the "old desktop", change the last desktop to + be where we are coming from */ screen_last_desktop = screen_old_desktop; } - } else { - if (screen_desktop == screen_old_desktop) { - /* do nothing */ - } else if (previous == screen_old_desktop) { - /* do nothing */ - } else if (screen_last_desktop == screen_old_desktop) { + else if (screen_last_desktop == screen_old_desktop) { + /* .. and also to the "old desktop", change the "last + desktop" to be where we are coming from */ screen_last_desktop = previous; - } else { - /* do nothing */ + } + else { + /* .. from some other desktop, then set the "last desktop" to + be the saved "old desktop", i.e. where we were before the + "last desktop" */ + screen_last_desktop = screen_old_desktop; + } + } + else { + /* If we are moving to any desktop besides the "last desktop".. + (this is the normal case) */ + if (screen_desktop == screen_old_desktop) { + /* If moving to the "old desktop", which is not the + "last desktop", don't save anything */ + } + else if (previous == screen_old_desktop) { + /* If moving from the "old desktop", and not to the + "last desktop", don't save anything */ + } + else if (screen_last_desktop == screen_old_desktop) { + /* If the "last desktop" is the same as "old desktop" and + you're not moving to the "last desktop" then save where + we're coming from as the "last desktop" */ + screen_last_desktop = previous; + } + else { + /* If the "last desktop" is different from the "old desktop" + and you're not moving to the "last desktop", then don't save + anything */ } } } From 2b80e4e8ef56bb4fba614139601e750344418e5b Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 18:13:12 -0500 Subject: [PATCH 25/79] ignore mouse clicks on override-redirect windows that aren't owned by openbox --- openbox/event.c | 48 +++++++++++++++++++++++++++++++++---- openbox/focus_cycle_popup.c | 2 ++ openbox/popup.c | 2 ++ openbox/window.h | 3 ++- 4 files changed, 49 insertions(+), 6 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index 03229117..cd562599 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -694,12 +694,50 @@ static void event_process(const XEvent *ec, gpointer data) } #endif - if (e->type == ButtonPress || e->type == ButtonRelease || - e->type == MotionNotify || e->type == KeyPress || - e->type == KeyRelease) - { - event_handle_user_input(client, e); + if (e->type == ButtonPress || e->type == ButtonRelease) { + /* If the button press was on some non-root window, or was physically + on the root window, the process it */ + if (window != RootWindow(ob_display, ob_screen) || + e->xbutton.subwindow == None) + { + event_handle_user_input(client, e); + } + /* Otherwise only process it if it was physically on an openbox + internal window */ + else { + Window target, parent, root, *children; + unsigned int nchildren; + ObWindow *w; + + /* Find the top level ancestor of the subwindow, besides the + root */ + target = e->xbutton.subwindow; + ob_debug("subwindow 0x%x\n", target); + while (XQueryTree(ob_display, target, &root, &parent, &children, + &nchildren) != 0) + { + XFree(children); + if (parent == root) { + ob_debug("parent is root\n"); + break; + } + target = parent; + } + ob_debug("toplevel 0x%x\n", target); + + w = g_hash_table_lookup(window_map, &target); + ob_debug("w 0x%x\n", w); + + if ((w = g_hash_table_lookup(window_map, &target)) && + WINDOW_IS_INTERNAL(w)) + { + event_handle_user_input(client, e); + } + } } + else if (e->type == KeyPress || e->type == KeyRelease || + e->type == MotionNotify) + event_handle_user_input(client, e); /* if something happens and it's not from an XEvent, then we don't know the time */ diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c index 028fa45d..9a6f2420 100644 --- a/openbox/focus_cycle_popup.c +++ b/openbox/focus_cycle_popup.c @@ -128,12 +128,14 @@ void focus_cycle_popup_startup(gboolean reconfig) XMapWindow(ob_display, popup.text); stacking_add(INTERNAL_AS_WINDOW(&popup)); + g_hash_table_insert(window_map, &popup.bg, &popup); } void focus_cycle_popup_shutdown(gboolean reconfig) { icon_popup_free(single_popup); + g_hash_table_remove(window_map, &popup.bg); stacking_remove(INTERNAL_AS_WINDOW(&popup)); while(popup.targets) { diff --git a/openbox/popup.c b/openbox/popup.c index 071f5b62..283348e7 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -58,6 +58,7 @@ ObPopup *popup_new(void) XMapWindow(ob_display, self->text); stacking_add(INTERNAL_AS_WINDOW(self)); + g_hash_table_insert(window_map, &self->bg, self); return self; } @@ -68,6 +69,7 @@ void popup_free(ObPopup *self) XDestroyWindow(ob_display, self->text); RrAppearanceFree(self->a_bg); RrAppearanceFree(self->a_text); + g_hash_table_remove(window_map, &self->bg); stacking_remove(self); g_free(self); } diff --git a/openbox/window.h b/openbox/window.h index aaf83995..a172cfce 100644 --- a/openbox/window.h +++ b/openbox/window.h @@ -32,7 +32,8 @@ typedef enum { Window_Dock, Window_DockApp, /* used for events but not stacking */ Window_Client, - Window_Internal /* used for stacking but not events */ + Window_Internal /* used for stacking but not events (except to filter + events on the root window) */ } Window_InternalType; struct _ObWindow From bf259be653b9c37c79f9cd8ababffe225857ce9f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 18:28:35 -0500 Subject: [PATCH 26/79] fixes from commit 0ce14a727968736e57fb3fabba3794b46903875f the xsync was needed to get the right serial for the end of the ignore range --- openbox/event.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index cd562599..cc3ea68f 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -74,6 +74,7 @@ typedef struct { ObClient *client; Time time; + gulong serial; } ObFocusDelayData; typedef struct @@ -246,7 +247,6 @@ static void event_set_curtime(XEvent *e) event_last_user_time = CurrentTime; event_curtime = t; - event_curserial = 0; } static void event_hack_mods(XEvent *e) @@ -742,6 +742,7 @@ static void event_process(const XEvent *ec, gpointer data) /* if something happens and it's not from an XEvent, then we don't know the time */ event_curtime = CurrentTime; + event_curserial = 0; } static void event_handle_root(XEvent *e) @@ -816,6 +817,7 @@ void event_enter_client(ObClient *client) data = g_new(ObFocusDelayData, 1); data->client = client; data->time = event_curtime; + data->serial = event_curserial; ob_main_loop_timeout_add(ob_main_loop, config_focus_delay * 1000, @@ -825,6 +827,7 @@ void event_enter_client(ObClient *client) ObFocusDelayData data; data.client = client; data.time = event_curtime; + data.serial = event_curserial; focus_delay_func(&data); } } @@ -1912,6 +1915,7 @@ static gboolean focus_delay_func(gpointer data) if (menu_frame_visible || moveresize_in_progress) return FALSE; event_curtime = d->time; + event_curserial = d->serial; if (client_focus(d->client) && config_focus_raise) stacking_raise(CLIENT_AS_WINDOW(d->client)); event_curtime = old; @@ -1924,7 +1928,7 @@ static void focus_delay_client_dest(ObClient *client, gpointer data) client, FALSE); } -void event_halt_focus_delay(gulong serial) +void event_halt_focus_delay() { /* ignore all enter events up till the event which caused this to occur */ if (event_curserial) event_ignore_enter_range(1, event_curserial); @@ -1933,7 +1937,6 @@ void event_halt_focus_delay(gulong serial) gulong event_start_ignore_all_enters(void) { - /* increment the serial so we don't ignore events we weren't meant to */ XSync(ob_display, FALSE); return LastKnownRequestProcessed(ob_display); } @@ -1959,6 +1962,7 @@ static void event_ignore_enter_range(gulong start, gulong end) void event_end_ignore_all_enters(gulong start) { + XSync(ob_display, FALSE); event_ignore_enter_range(start, LastKnownRequestProcessed(ob_display)); } From 78cd9bba523f4986413e3aefe87704e9d11cd081 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 18:33:43 -0500 Subject: [PATCH 27/79] continue commit 2b80e4e8ef56bb4fba614139601e750344418e5b - remove debug code, and some unneeded stuff --- openbox/event.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index cc3ea68f..d2cb7567 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -705,30 +705,9 @@ static void event_process(const XEvent *ec, gpointer data) /* Otherwise only process it if it was physically on an openbox internal window */ else { - Window target, parent, root, *children; - unsigned int nchildren; ObWindow *w; - /* Find the top level ancestor of the subwindow, besides the - root */ - target = e->xbutton.subwindow; - ob_debug("subwindow 0x%x\n", target); - while (XQueryTree(ob_display, target, &root, &parent, &children, - &nchildren) != 0) - { - XFree(children); - if (parent == root) { - ob_debug("parent is root\n"); - break; - } - target = parent; - } - ob_debug("toplevel 0x%x\n", target); - - w = g_hash_table_lookup(window_map, &target); - ob_debug("w 0x%x\n", w); - - if ((w = g_hash_table_lookup(window_map, &target)) && + if ((w = g_hash_table_lookup(window_map, &e->xbutton.subwindow)) && WINDOW_IS_INTERNAL(w)) { event_handle_user_input(client, e); From 040d344a89f40487de8a1920e0aaeccd93a6a995 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 18:57:32 -0500 Subject: [PATCH 28/79] don't take KeyRelease events for menus until they receive a KeyPress event first. avoid using the key binding used to show the menu to execute something inside it. --- openbox/event.c | 4 +++- openbox/menuframe.h | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/openbox/event.c b/openbox/event.c index d2cb7567..6b0ecdd7 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1671,6 +1671,8 @@ static gboolean event_handle_menu_keyboard(XEvent *ev) /* Allow control while going thru the menu */ else if (ev->type == KeyPress && (state & ~ControlMask) == 0) { + frame->got_press = TRUE; + if (keycode == ob_keycode(OB_KEY_ESCAPE)) { menu_frame_hide_all(); ret = TRUE; @@ -1704,7 +1706,7 @@ static gboolean event_handle_menu_keyboard(XEvent *ev) Allow ControlMask only, and don't bother if the menu is empty */ else if (ev->type == KeyRelease && (state & ~ControlMask) == 0 && - frame->entries) + frame->entries && frame->got_press) { if (keycode == ob_keycode(OB_KEY_RETURN)) { /* Enter runs the active item or goes into the submenu. diff --git a/openbox/menuframe.h b/openbox/menuframe.h index 191bcfe8..06975972 100644 --- a/openbox/menuframe.h +++ b/openbox/menuframe.h @@ -73,6 +73,11 @@ struct _ObMenuFrame RrAppearance *a_title; RrAppearance *a_items; + + gboolean got_press; /* don't allow a KeyRelease event to run things in the + menu until it has seen a KeyPress. this is to + avoid having the keybinding used to show the menu + end up running something inside the menu */ }; struct _ObMenuEntryFrame From d7b25da169d0a466e3fd88bec9344e25d64584f6 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 19:05:04 -0500 Subject: [PATCH 29/79] make the window_startup happen before the focus_cycle_popup startup, so that the popups can be added to the window map properly --- openbox/openbox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbox/openbox.c b/openbox/openbox.c index ff226af4..c7e28324 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -292,12 +292,12 @@ gint main(gint argc, gchar **argv) event_startup(reconfigure); /* focus_backup is used for stacking, so this needs to come before anything that calls stacking_add */ + sn_startup(reconfigure); + window_startup(reconfigure); focus_startup(reconfigure); focus_cycle_startup(reconfigure); focus_cycle_indicator_startup(reconfigure); focus_cycle_popup_startup(reconfigure); - window_startup(reconfigure); - sn_startup(reconfigure); screen_startup(reconfigure); grab_startup(reconfigure); group_startup(reconfigure); @@ -367,8 +367,8 @@ gint main(gint argc, gchar **argv) focus_cycle_indicator_shutdown(reconfigure); focus_cycle_shutdown(reconfigure); focus_shutdown(reconfigure); - sn_shutdown(reconfigure); window_shutdown(reconfigure); + sn_shutdown(reconfigure); event_shutdown(reconfigure); config_shutdown(); actions_shutdown(reconfigure); From 602a73c15ce22250a604e443a994ad6c8726f3f5 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 19:30:29 -0500 Subject: [PATCH 30/79] make fake xinerama happen even when xinerama is enabled --- openbox/extensions.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/openbox/extensions.c b/openbox/extensions.c index ee73e9ec..d1088361 100644 --- a/openbox/extensions.c +++ b/openbox/extensions.c @@ -86,6 +86,16 @@ void extensions_xinerama_screens(Rect **xin_areas, guint *nxin) { guint i; gint l, r, t, b; + if (ob_debug_xinerama) { + g_print("Using fake xinerama !\n"); + gint w = WidthOfScreen(ScreenOfDisplay(ob_display, ob_screen)); + gint h = HeightOfScreen(ScreenOfDisplay(ob_display, ob_screen)); + *nxin = 2; + *xin_areas = g_new(Rect, *nxin + 1); + RECT_SET((*xin_areas)[0], 0, 0, w/2, h); + RECT_SET((*xin_areas)[1], w/2, 0, w-(w/2), h); + } + else #ifdef XINERAMA if (extensions_xinerama) { guint i; @@ -97,17 +107,10 @@ void extensions_xinerama_screens(Rect **xin_areas, guint *nxin) RECT_SET((*xin_areas)[i], info[i].x_org, info[i].y_org, info[i].width, info[i].height); XFree(info); - } else -#endif - if (ob_debug_xinerama) { - gint w = WidthOfScreen(ScreenOfDisplay(ob_display, ob_screen)); - gint h = HeightOfScreen(ScreenOfDisplay(ob_display, ob_screen)); - *nxin = 2; - *xin_areas = g_new(Rect, *nxin + 1); - RECT_SET((*xin_areas)[0], 0, 0, w/2, h); - RECT_SET((*xin_areas)[1], w/2, 0, w-(w/2), h); } - else { + else +#endif + { *nxin = 1; *xin_areas = g_new(Rect, *nxin + 1); RECT_SET((*xin_areas)[0], 0, 0, From 22333336d3ba36784955c67444f996b557f3838a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 19:32:45 -0500 Subject: [PATCH 31/79] add an option for window placement, to try force new windows on the active monitor (for xinerama) --- data/rc.xml | 3 +++ data/rc.xsd | 1 + openbox/config.c | 4 ++++ openbox/config.h | 4 ++++ openbox/place.c | 13 ++++++++----- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/data/rc.xml b/data/rc.xml index e3a59eb2..efbd8a9c 100644 --- a/data/rc.xml +++ b/data/rc.xml @@ -35,6 +35,9 @@
yes
+ no + diff --git a/data/rc.xsd b/data/rc.xsd index adafc5f4..ef610bfa 100644 --- a/data/rc.xsd +++ b/data/rc.xsd @@ -54,6 +54,7 @@ + diff --git a/openbox/config.c b/openbox/config.c index ff4c542b..25e30fff 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -38,6 +38,7 @@ gboolean config_focus_under_mouse; ObPlacePolicy config_place_policy; gboolean config_place_center; +gboolean config_place_active; StrutPartial config_margins; @@ -500,6 +501,8 @@ static void parse_placement(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, config_place_policy = OB_PLACE_POLICY_MOUSE; if ((n = parse_find_node("center", node))) config_place_center = parse_bool(doc, n); + if ((n = parse_find_node("active", node))) + config_place_active = parse_bool(doc, n); } static void parse_margins(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, @@ -880,6 +883,7 @@ void config_startup(ObParseInst *i) config_place_policy = OB_PLACE_POLICY_SMART; config_place_center = TRUE; + config_place_active = FALSE; parse_register(i, "placement", parse_placement, NULL); diff --git a/openbox/config.h b/openbox/config.h index 9d0602e2..2c4b4dba 100644 --- a/openbox/config.h +++ b/openbox/config.h @@ -75,9 +75,13 @@ extern gboolean config_focus_last; */ extern gboolean config_focus_under_mouse; +/*! The algorithm to use for placing new windows */ extern ObPlacePolicy config_place_policy; /*! Place windows in the center of the free area */ extern gboolean config_place_center; +/*! Place windows on the active monitor (unless they are part of an application + already on another monitor) */ +extern gboolean config_place_active; /*! User-specified margins around the edge of the screen(s) */ extern StrutPartial config_margins; diff --git a/openbox/place.c b/openbox/place.c index aa572db2..276d9288 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -108,9 +108,9 @@ static Rect **pick_head(ObClient *c) } } - if (focus_client) { + if (focus_client && client_normal(focus_client)) { add_choice(choice, client_monitor(focus_client)); - ob_debug("placement adding choice %d for focused window\n", + ob_debug("placement adding choice %d for normal focused window\n", client_monitor(focus_client)); } @@ -146,7 +146,7 @@ static gboolean place_random(ObClient *client, gint *x, gint *y) guint i; areas = pick_head(client); - i = g_random_int_range(0, screen_num_monitors); + i = config_place_active ? 0 : g_random_int_range(0, screen_num_monitors); l = areas[i]->x; t = areas[i]->y; @@ -254,8 +254,11 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y) /* try ignoring different things to find empty space */ for (ignore = 0; ignore < IGNORE_END && !ret; ignore++) { - /* try all monitors in order of preference */ - for (i = 0; i < screen_num_monitors && !ret; ++i) { + /* try all monitors in order of preference, but only the first one + if config_place_active is true */ + for (i = 0; (i < (config_place_active ? 1 : screen_num_monitors) && + !ret); ++i) + { GList *it; /* add the whole monitor */ From b7e23f286a53b7beb259afac7e1a4cdf5fca47a4 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 19:45:30 -0500 Subject: [PATCH 32/79] make the focus cycle indicator be in the window_map so button presses on it are handled right --- openbox/focus_cycle_indicator.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/openbox/focus_cycle_indicator.c b/openbox/focus_cycle_indicator.c index 5a6a1029..340abec6 100644 --- a/openbox/focus_cycle_indicator.c +++ b/openbox/focus_cycle_indicator.c @@ -82,6 +82,14 @@ void focus_cycle_indicator_startup(gboolean reconfig) stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.left)); stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.right)); stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.bottom)); + g_hash_table_insert(window_map, &focus_indicator.top.win, + &focus_indicator.top); + g_hash_table_insert(window_map, &focus_indicator.left.win, + &focus_indicator.left); + g_hash_table_insert(window_map, &focus_indicator.right.win, + &focus_indicator.right); + g_hash_table_insert(window_map, &focus_indicator.bottom.win, + &focus_indicator.bottom); color_white = RrColorNew(ob_rr_inst, 0xff, 0xff, 0xff); @@ -108,6 +116,11 @@ void focus_cycle_indicator_shutdown(gboolean reconfig) RrAppearanceFree(a_focus_indicator); + g_hash_table_remove(window_map, &focus_indicator.top.win); + g_hash_table_remove(window_map, &focus_indicator.left.win); + g_hash_table_remove(window_map, &focus_indicator.right.win); + g_hash_table_remove(window_map, &focus_indicator.bottom.win); + stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.top)); stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.left)); stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.right)); From 17bc51aab8be25cd44c55eb0a652c92518bd9b0f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 20:24:16 -0500 Subject: [PATCH 33/79] let you specify the resize popup to be in a fixed place --- data/rc.xml | 12 ++++++++- data/rc.xsd | 5 ++++ openbox/config.c | 63 ++++++++++++++++++++++++++++++++++++++------ openbox/config.h | 21 +++++++++++++-- openbox/moveresize.c | 47 +++++++++++++++++++++++++++++++-- openbox/moveresize.h | 6 +++++ 6 files changed, 141 insertions(+), 13 deletions(-) diff --git a/data/rc.xml b/data/rc.xml index efbd8a9c..3cd88ee8 100644 --- a/data/rc.xml +++ b/data/rc.xml @@ -129,7 +129,17 @@ Nonpixel Center - + + + + + 10 + + 10 + +