summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-02-07 03:07:56 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-02-07 03:07:56 +0000
commit8ae714eeaef03db0a55c11fc31834c8d65e2ea03 (patch)
treee3bc1027754f8e70bfc06266f798f682802c4342 /src/tools
parent2be2d8ccbe196193d383841e1c990843a35d4f1b (diff)
downloadmetacity-8ae714eeaef03db0a55c11fc31834c8d65e2ea03.tar.gz
metacity-8ae714eeaef03db0a55c11fc31834c8d65e2ea03.tar.bz2
disable custom log handler and fatal mask for now
2002-02-06 Havoc Pennington <hp@pobox.com> * src/main.c (main): disable custom log handler and fatal mask for now * src/theme.c (meta_draw_op_list_draw): Add META_DRAW_CLIP * src/main.c: load theme, monitor current theme setting * src/prefs.c: add "current theme" setting * src/stack.c (meta_stack_free): don't try to free last_root_children_stacked if it doesn't exist * src/themewidget.c: pluggable GtkMisc subclass to use for menu icons * src/screen.c (meta_screen_manage_all_windows): fix signed/unsigned warning * src/frames.c: port to theme system (meta_frames_style_set): chain up * theme-format.txt: new file * configure.in: add more compiler warnings * src/theme.c: add various stuff needed to get theme parser working. Remove the "spacer" concept from FrameLayout object. Add draw op that references a draw op list. * configure.in: require GTK 1.3.13 * src/Makefile.am: add theme-parser.[hc], implement loading a theme * src/theme.c: add "draw title" and "draw window icon" operations (meta_draw_op_draw): put object_width/object_height in expression environment before computing x/y. Handle out-of-memory when creating pixbufs. Assorted other cleanups.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/Makefile.am8
-rw-r--r--src/tools/metacity-reload-theme.c56
2 files changed, 62 insertions, 2 deletions
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
index 0db4a69..4b97151 100644
--- a/src/tools/Makefile.am
+++ b/src/tools/Makefile.am
@@ -1,9 +1,13 @@
-INCLUDES=@METACITY_RESTART_CFLAGS@
+INCLUDES=@METACITY_RESTART_CFLAGS@ @METACITY_RELOAD_THEME_CFLAGS@
metacity_restart_SOURCES= \
metacity-restart.c
-bin_PROGRAMS=metacity-restart
+metacity_reload_theme_SOURCES= \
+ metacity-reload-theme.c
+
+bin_PROGRAMS=metacity-restart metacity-reload-theme
metacity_restart_LDADD= @METACITY_RESTART_LIBS@
+metacity_reload_theme_LDADD= @METACITY_RELOAD_THEME_LIBS@
diff --git a/src/tools/metacity-reload-theme.c b/src/tools/metacity-reload-theme.c
new file mode 100644
index 0000000..0ef19d5
--- /dev/null
+++ b/src/tools/metacity-reload-theme.c
@@ -0,0 +1,56 @@
+/* Metacity theme-reloader app */
+
+/*
+ * Copyright (C) 2002 Havoc Pennington
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
+
+int
+main (int argc, char **argv)
+{
+ XEvent xev;
+
+ gtk_init (&argc, &argv);
+
+ xev.xclient.type = ClientMessage;
+ xev.xclient.serial = 0;
+ xev.xclient.send_event = True;
+ xev.xclient.display = gdk_display;
+ xev.xclient.window = gdk_x11_get_default_root_xwindow ();
+ xev.xclient.message_type = XInternAtom (gdk_display,
+ "_METACITY_RELOAD_THEME_MESSAGE",
+ False);
+ xev.xclient.format = 32;
+ xev.xclient.data.l[0] = 0;
+ xev.xclient.data.l[1] = 0;
+ xev.xclient.data.l[2] = 0;
+
+ XSendEvent (gdk_display,
+ gdk_x11_get_default_root_xwindow (),
+ False,
+ SubstructureRedirectMask | SubstructureNotifyMask,
+ &xev);
+
+ XFlush (gdk_display);
+ XSync (gdk_display, False);
+
+ return 0;
+}
+