merge r6996-7017 from trunk
authorDana Jansens <danakj@orodu.net>
Mon, 28 May 2007 20:11:21 +0000 (20:11 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 28 May 2007 20:11:21 +0000 (20:11 +0000)
17 files changed:
.svnignore [new file with mode: 0644]
configure.ac
data/xsession/.svnignore [new file with mode: 0644]
debian/.svnignore [new file with mode: 0644]
doc/.svnignore [new file with mode: 0644]
m4/.svnignore [new file with mode: 0644]
openbox/openbox.c
openbox/prop.c
openbox/prop.h
openbox/screen.c
po/.svnignore [new file with mode: 0644]
po/ca.po
render/theme.c
render/theme.h
tests/.svnignore [new file with mode: 0644]
tests/confignotifymax.c [new file with mode: 0644]
tools/themetoxml/.svnignore [new file with mode: 0644]

diff --git a/.svnignore b/.svnignore
new file mode 100644 (file)
index 0000000..3481fc0
--- /dev/null
@@ -0,0 +1,20 @@
+configure
+build-stamp
+Makefile.in
+config.rpath
+config.log
+depcomp
+compile
+config.guess
+ltmain.sh
+config.sub
+ABOUT-NLS
+config.status.lineno
+Makefile
+mkinstalldirs
+config.status
+libtool
+autom4te.cache
+missing
+version.h
+aclocal.m4
index a55d4f4eeb1c464e652c7ba35c62695ea5da405b..7d2a0dd914ea4b663d1efb61d205a884059c2954 100644 (file)
@@ -16,7 +16,7 @@ dnl
 OB_MAJOR_VERSION=3
 OB_MINOR_VERSION=4
 OB_MICRO_VERSION=11
-OB_INTERFACE_AGE=5
+OB_INTERFACE_AGE=0
 OB_BINARY_AGE=5
 OB_VERSION=$OB_MAJOR_VERSION.$OB_MINOR_VERSION
 
diff --git a/data/xsession/.svnignore b/data/xsession/.svnignore
new file mode 100644 (file)
index 0000000..f4018d6
--- /dev/null
@@ -0,0 +1,6 @@
+openbox.desktop
+openbox-kde.desktop
+openbox-gnome.desktop
+openbox-session
+openbox-kde-session
+openbox-gnome-session
diff --git a/debian/.svnignore b/debian/.svnignore
new file mode 100644 (file)
index 0000000..bb49320
--- /dev/null
@@ -0,0 +1,6 @@
+openbox.postinst.debhelper
+openbox.postrm.debhelper
+changelog
+files
+openbox.substvars
+openbox
diff --git a/doc/.svnignore b/doc/.svnignore
new file mode 100644 (file)
index 0000000..cbbd841
--- /dev/null
@@ -0,0 +1,4 @@
+openbox-session.1
+openbox-kde-session.1
+openbox-gnome-session.1
+openbox.1
diff --git a/m4/.svnignore b/m4/.svnignore
new file mode 100644 (file)
index 0000000..423e303
--- /dev/null
@@ -0,0 +1,37 @@
+
+lib-link.m4
+printf-posix.m4
+Makefile.in
+intldir.m4
+uintmax_t.m4
+signed.m4
+iconv.m4
+inttypes.m4
+longlong.m4
+glibc21.m4
+codeset.m4
+inttypes_h.m4
+visibility.m4
+lock.m4
+longdouble.m4
+nls.m4
+Makefile
+intmax.m4
+lib-prefix.m4
+glibc2.m4
+xsize.m4
+lcmessage.m4
+lib-ld.m4
+ulonglong.m4
+wint_t.m4
+inttypes-h.m4
+intl.m4
+progtest.m4
+inttypes-pri.m4
+stdint_h.m4
+intdiv0.m4
+po.m4
+isc-posix.m4
+size_max.m4
+gettext.m4
+wchar_t.m4
index ce92d5228ae196d99d914d6dacbb9f33877e5c9d..42a062bef5a85d2e12b7649361c20af921144bd2 100644 (file)
@@ -273,6 +273,9 @@ gint main(gint argc, gchar **argv)
                 }
                 if (ob_rr_theme == NULL)
                     ob_exit_with_error(_("Unable to load a theme."));
+
+                PROP_SETS(RootWindow(ob_display, ob_screen),
+                          ob_theme, theme->name);
             }
 
             if (reconfigure) {
index 1412752a50296986fb41211fdf6ee55a04960c38..aec146d52933c1bb81a66cd18da3c46cd67a1e9a 100644 (file)
@@ -171,7 +171,7 @@ void prop_startup()
 */
 
     CREATE(openbox_pid, "_OPENBOX_PID");
-    CREATE(ob_config, "_OB_CONFIG");
+    CREATE(ob_theme, "_OB_THEME");
     CREATE(ob_wm_action_undecorate, "_OB_WM_ACTION_UNDECORATE");
     CREATE(ob_wm_state_undecorated, "_OB_WM_STATE_UNDECORATED");
     CREATE(ob_control, "_OB_CONTROL");
index 3f18a363398e52a6a43abe8df22fca3f7de0e046..b9d6795eda1f296d4ca801714178542927111cc7 100644 (file)
@@ -193,7 +193,7 @@ typedef struct Atoms {
     Atom ob_wm_action_undecorate;
     Atom ob_wm_state_undecorated;
     Atom openbox_pid; /* this is depreecated in favour of ob_control */
-    Atom ob_config;
+    Atom ob_theme;
     Atom ob_control;
 } Atoms;
 Atoms prop_atoms;
index 11d527ee7c4fd43c9cee8c9984155d52d346473e..f515e4ec2181b9a953e17bdae6db5749ec38c810 100644 (file)
@@ -52,6 +52,7 @@
 
 static gboolean screen_validate_layout(ObDesktopLayout *l);
 static gboolean replace_wm();
+static void     screen_tell_ksplash();
 
 guint    screen_num_desktops;
 guint    screen_num_monitors;
@@ -294,7 +295,7 @@ gboolean screen_annex()
     supported[i++] = prop_atoms.ob_wm_action_undecorate;
     supported[i++] = prop_atoms.ob_wm_state_undecorated;
     supported[i++] = prop_atoms.openbox_pid;
-    supported[i++] = prop_atoms.ob_config;
+    supported[i++] = prop_atoms.ob_theme;
     supported[i++] = prop_atoms.ob_control;
     g_assert(i == num_support);
 
@@ -302,9 +303,36 @@ gboolean screen_annex()
                 net_supported, atom, supported, num_support);
     g_free(supported);
 
+    screen_tell_ksplash();
+
     return TRUE;
 }
 
+static void screen_tell_ksplash()
+{
+    XEvent e;
+    const char *args[] = { "dcop", "ksplash", "ksplash",
+                           "upAndRunning(QString)", "wm started", NULL };
+
+    /* tell the dcop server through the command line interface */
+    g_spawn_async(NULL, args, NULL,
+                  G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
+                  NULL, NULL, NULL, NULL);
+
+    /* i'm not sure why we do this, kwin does it, but ksplash doesn't seem to
+       hear it anyways. perhaps it is for old ksplash. or new ksplash. or
+       something. oh well. */
+    e.xclient.type = ClientMessage;
+    e.xclient.display = ob_display;
+    e.xclient.window = RootWindow(ob_display, ob_screen);
+    e.xclient.message_type =
+        XInternAtom(ob_display, "_KDE_SPLASH_PROGRESS", False );
+    e.xclient.format = 8;
+    strcpy(e.xclient.data.b, "wm started");
+    XSendEvent(ob_display, RootWindow(ob_display, ob_screen),
+               False, SubstructureNotifyMask, &e );
+}
+
 void screen_startup(gboolean reconfig)
 {
     gchar **names = NULL;
diff --git a/po/.svnignore b/po/.svnignore
new file mode 100644 (file)
index 0000000..fb5e504
--- /dev/null
@@ -0,0 +1,14 @@
+*.gmo
+Makefile.in
+remove-potcdate.sin
+Makefile.in.in
+quot.sed
+Makefile
+Rules-quot
+insert-header.sin
+Makevars.template
+POTFILES
+stamp-po
+en@quot.header
+en@boldquot.header
+boldquot.sed
index 78cd475c20cba903cc443ca6d867452cb05ffcea..1e3077362d00d534ca1b88420891a3125b722655 100644 (file)
--- a/po/ca.po
+++ b/po/ca.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Openbox 3.4\n"
 "Report-Msgid-Bugs-To: http://bugzilla.icculus.org\n"
-"POT-Creation-Date: 2007-05-23 16:20+0200\n"
-"PO-Revision-Date: 2007-05-28 01:32+0200\n"
+"POT-Creation-Date: 2007-05-28 07:55+0200\n"
+"PO-Revision-Date: 2007-05-28 15:54+0200\n"
 "Last-Translator: David Majà Martínez <davidmaja@gmail.com>\n"
 "Language-Team: catalan\n"
 "MIME-Version: 1.0\n"
@@ -18,19 +18,19 @@ msgstr ""
 #: openbox/action.c:954
 #, c-format
 msgid "Invalid action '%s' requested. No such action exists."
-msgstr "L''acció sol·licitada '%s' no és vàlida. Aquesta acció no existeix."
+msgstr "L'acció sol·licitada '%s' no és vàlida. Aquesta acció no existeix."
 
 #: openbox/action.c:957
 #, c-format
 msgid "Invalid use of action '%s'. Action will be ignored."
-msgstr "L''ús de l'acció '%s' no és vàlid. S'ignorarà aquesta acció."
+msgstr "L'ús de l'acció '%s' no és vàlid. S'ignorarà aquesta acció."
 
-#: openbox/action.c:1226 openbox/action.c:1244 openbox/action.c:1257
+#: openbox/action.c:1224 openbox/action.c:1242 openbox/action.c:1255
 #, c-format
 msgid "Failed to execute '%s': %s"
 msgstr "No s'ha pogut executar '%s': %s"
 
-#: openbox/action.c:1265
+#: openbox/action.c:1263
 #, c-format
 msgid "Failed to convert the path '%s' from utf8"
 msgstr "No s'ha pogut convertir el camí '%s' des de utf8"
@@ -43,7 +43,7 @@ msgstr "Vés aquí..."
 msgid "Windows"
 msgstr "Finestres"
 
-#: openbox/client_list_menu.c:196
+#: openbox/client_list_menu.c:195
 msgid "Desktops"
 msgstr "Escriptoris"
 
@@ -124,7 +124,8 @@ msgstr "No s'ha pogut trobar un fitxer de menú '%s' vàlid"
 #: openbox/menu.c:149
 #, c-format
 msgid "Failed to execute command for pipe-menu '%s': %s"
-msgstr "S'ha produït un error en executar l'ordre per al menú de conducte '%s': %s"
+msgstr ""
+"S'ha produït un error en executar l'ordre per al menú de conducte '%s': %s"
 
 #: openbox/menu.c:166
 #, c-format
@@ -173,7 +174,9 @@ msgstr "No s'ha pogut assignar els modificadors del locale per al servidor X."
 
 #: openbox/openbox.c:249
 msgid "Unable to find a valid config file, using some simple defaults"
-msgstr "No s'ha pogut trobat un fitxer de configuració vàlid, s'utilitzaran alguns valors predeterminats"
+msgstr ""
+"No s'ha pogut trobat un fitxer de configuració vàlid, s'utilitzaran alguns "
+"valors predeterminats"
 
 #: openbox/openbox.c:275
 msgid "Unable to load a theme."
@@ -182,7 +185,9 @@ msgstr "No s'ha pogut carregar el tema."
 #: openbox/openbox.c:394
 #, c-format
 msgid "Restart failed to execute new executable '%s': %s"
-msgstr "S'ha produït un error en tornar a iniciar i executar el nou executable '%s': %s"
+msgstr ""
+"S'ha produït un error en tornar a iniciar i executar el nou executable '%s': "
+"%s"
 
 #: openbox/openbox.c:464 openbox/openbox.c:466
 msgid "Copyright (c)"
@@ -210,7 +215,9 @@ msgstr "  --version           Visualitza la versió i surt\n"
 
 #: openbox/openbox.c:479
 msgid "  --replace           Replace the currently running window manager\n"
-msgstr "  --replace           Reemplaça el gestor de finestres que s'està executant actualment\n"
+msgstr ""
+"  --replace           Reemplaça el gestor de finestres que s'està executant "
+"actualment\n"
 
 #: openbox/openbox.c:480
 msgid "  --sm-disable        Disable connection to the session manager\n"
@@ -222,7 +229,8 @@ msgid ""
 "Passing messages to a running Openbox instance:\n"
 msgstr ""
 "\n"
-"S'està transferint missatges a la instància del Openbox que s'està executant:\n"
+"S'està transferint missatges a la instància del Openbox que s'està "
+"executant:\n"
 
 #: openbox/openbox.c:482
 msgid "  --reconfigure       Reload Openbox's configuration\n"
@@ -250,11 +258,15 @@ msgstr "  --debug             Mostra la sortida de depuració\n"
 
 #: openbox/openbox.c:487
 msgid "  --debug-focus       Display debugging output for focus handling\n"
-msgstr "  --debug-focus       Mostra la sortida de depuració per a la gestió del focus\n"
+msgstr ""
+"  --debug-focus       Mostra la sortida de depuració per a la gestió del "
+"focus\n"
 
 #: openbox/openbox.c:488
 msgid "  --debug-xinerama    Split the display into fake xinerama screens\n"
-msgstr "  --debug-xinerama    Divideix la visualització en pantalles xinerama falses\n"
+msgstr ""
+"  --debug-xinerama    Divideix la visualització en pantalles xinerama "
+"falses\n"
 
 #: openbox/openbox.c:489
 #, c-format
@@ -278,14 +290,15 @@ msgstr "Encara s'està executant un gestor de finestres a la pantalla %d"
 #: openbox/screen.c:125
 #, c-format
 msgid "Could not acquire window manager selection on screen %d"
-msgstr "No s'ha pogut adquirir la selecció del gestor de finestres en la pantalla %d"
+msgstr ""
+"No s'ha pogut adquirir la selecció del gestor de finestres en la pantalla %d"
 
 #: openbox/screen.c:146
 #, c-format
 msgid "The WM on screen %d is not exiting"
 msgstr "El gestor de finestres de la pantalla %d no està sortint"
 
-#: openbox/screen.c:939
+#: openbox/screen.c:950
 #, c-format
 msgid "desktop %i"
 msgstr "escriptori %i"
@@ -313,7 +326,8 @@ msgstr "Executant %s\n"
 #: openbox/translate.c:58
 #, c-format
 msgid "Invalid modifier key '%s' in key/mouse binding"
-msgstr "La tecla modificadora '%s' no és vàlida en la vinculació de tecles/ratolí"
+msgstr ""
+"La tecla modificadora '%s' no és vàlida en la vinculació de tecles/ratolí"
 
 #: openbox/translate.c:135
 #, c-format
@@ -330,7 +344,7 @@ msgstr "El nom de la tecla '%s' no és vàlid en la vinculació de tecles"
 msgid "Requested key '%s' does not exist on the display"
 msgstr "La tecla seleccionada '%s' no existeix a la pantalla"
 
-#: openbox/xerror.c:39
+#: openbox/xerror.c:38
 #, c-format
 msgid "X Error: %s"
-msgstr "Error d''X: %s"
+msgstr "Error d'X: %s"
index 2566f3072050c3bb971835c186b0c8617446e272..951bbde5ce8a9bc1f75ed8c05da5600879942c02 100644 (file)
@@ -61,6 +61,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
     theme = g_new0(RrTheme, 1);
 
     theme->inst = inst;
+    theme->name = g_strdup(name);
 
     theme->a_disabled_focused_max = RrAppearanceNew(inst, 1);
     theme->a_disabled_unfocused_max = RrAppearanceNew(inst, 1);
@@ -1234,6 +1235,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
 void RrThemeFree(RrTheme *theme)
 {
     if (theme) {
+        g_free(theme->name);
+
         RrColorFree(theme->menu_border_color);
         RrColorFree(theme->frame_focused_border_color);
         RrColorFree(theme->frame_unfocused_border_color);
index 4e87fb12ed8401d58ec1980aeda1eafa2bf4e6c6..dda67071a91e24d3301493c5fd3d8ad11019d0a0 100644 (file)
@@ -230,6 +230,7 @@ struct _RrTheme {
     RrAppearance *osd_hilite_label; /* can be parent relative */
     RrAppearance *osd_unhilite_fg; /* can never be parent relative */
 
+    gchar *name;
 };
 
 /*! The font values are all optional. If a NULL is used for any of them, then
diff --git a/tests/.svnignore b/tests/.svnignore
new file mode 100644 (file)
index 0000000..d180071
--- /dev/null
@@ -0,0 +1,35 @@
+title
+confignotify
+fallback
+grouptran2
+grouptrancircular
+fakeunmap
+showhide
+modal2
+skiptaskbar
+modal3
+override
+grouptran
+borderchange
+grouptrancircular2
+restack
+stacking
+groupmodal
+icons
+duplicatesession
+aspect
+modal
+noresize
+shape
+big
+urgent
+focusout
+positioned
+strut
+grav
+resize
+fullscreen
+mapiconic
+extentsrequest
+usertimewin
+confignotifymax
diff --git a/tests/confignotifymax.c b/tests/confignotifymax.c
new file mode 100644 (file)
index 0000000..4d1a6c9
--- /dev/null
@@ -0,0 +1,97 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   confignotify.c for the Openbox window manager
+   Copyright (c) 2003-2007   Dana Jansens
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   See the COPYING file for a copy of the GNU General Public License.
+*/
+
+#include <stdio.h>
+#include <unistd.h>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+
+int main () {
+    Display   *display;
+    Window     win;
+    XEvent     report;
+    XEvent     msg;
+    Atom       _net_max[2],_net_state;
+    int        x=10,y=10,h=100,w=100;
+
+    display = XOpenDisplay(NULL);
+
+    if (display == NULL) {
+        fprintf(stderr, "couldn't connect to X server :0\n");
+        return 0;
+    }
+
+    _net_state = XInternAtom(display, "_NET_WM_STATE", False);
+    _net_max[0] = XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_VERT", False);
+    _net_max[1] = XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_HORZ", False);
+
+    win = XCreateWindow(display, RootWindow(display, 0),
+                        x, y, w, h, 0, CopyFromParent, CopyFromParent,
+                        CopyFromParent, 0, NULL);
+
+    XSetWindowBackground(display,win,WhitePixel(display,0)); 
+    XChangeProperty(display, win, _net_state, XA_ATOM, 32,
+                    PropModeReplace, (unsigned char*)&_net_max, 2);
+
+    XSelectInput(display, win, (ExposureMask | StructureNotifyMask |
+                                GravityNotify));
+
+    XMapWindow(display, win);
+    XFlush(display);
+
+    //sleep(1);
+    //XResizeWindow(display, win, w+5, h+5);
+    //XMoveWindow(display, win, x, y);
+
+    while (1) {
+        XNextEvent(display, &report);
+
+        switch (report.type) {
+        case MapNotify:
+            printf("map notify\n");
+            break;
+        case Expose:
+            printf("exposed\n");
+            break;
+        case GravityNotify:
+            printf("gravity notify event 0x%x window 0x%x x %d y %d\n",
+                   report.xgravity.event, report.xgravity.window,
+                   report.xgravity.x, report.xgravity.y);
+            break;
+        case ConfigureNotify: {
+            int se = report.xconfigure.send_event;
+            int event = report.xconfigure.event;
+            int window = report.xconfigure.window;
+            int x = report.xconfigure.x;
+            int y = report.xconfigure.y;
+            int w = report.xconfigure.width;
+            int h = report.xconfigure.height;
+            int bw = report.xconfigure.border_width;
+            int above = report.xconfigure.above;
+            int or = report.xconfigure.override_redirect;
+            printf("confignotify send %d ev 0x%x win 0x%x %i,%i-%ix%i bw %i\n"
+                   "             above 0x%x ovrd %d\n",
+                   se,event,window,x,y,w,h,bw,above,or);
+            break;
+        }
+        }
+
+    }
+
+    return 1;
+}
diff --git a/tools/themetoxml/.svnignore b/tools/themetoxml/.svnignore
new file mode 100644 (file)
index 0000000..97f8909
--- /dev/null
@@ -0,0 +1,4 @@
+.dirstamp
+themetoxml
+.libs
+.deps