diff options
author | Ales Kozumplik <akozumpl@redhat.com> | 2010-02-18 17:07:50 +0100 |
---|---|---|
committer | Ales Kozumplik <akozumpl@redhat.com> | 2010-03-05 11:26:59 +0100 |
commit | 73f1216cf9036cbc71318d4a093841d245e49ccd (patch) | |
tree | 883b5640a554830affd8a9710a04ac319576843c | |
parent | e83cb6a625c333cd599e31b9a10b328d6d93894c (diff) | |
download | anaconda-73f1216cf9036cbc71318d4a093841d245e49ccd.tar.gz anaconda-73f1216cf9036cbc71318d4a093841d245e49ccd.tar.xz anaconda-73f1216cf9036cbc71318d4a093841d245e49ccd.zip |
Remove mini-wm.c. (#520146)
and places where it's mentioned.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | anaconda.spec.in | 1 | ||||
-rw-r--r-- | mini-wm.c | 123 | ||||
-rwxr-xr-x | scripts/upd-instroot | 1 |
5 files changed, 0 insertions, 131 deletions
diff --git a/.gitignore b/.gitignore index 79a5a10a4..3a60b3e48 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,6 @@ m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 -mini-wm missing po/*.gmo po/POTFILES diff --git a/Makefile.am b/Makefile.am index 0003a24cc..273508f02 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,13 +37,8 @@ MOSTLYCLEANDIRS = m4 dist_noinst_DATA = $(PACKAGE_NAME).spec -bin_PROGRAMS = mini-wm dist_sbin_SCRIPTS = anaconda -mini_wm_CFLAGS = $(X11_CFLAGS) $(XCOMPOSITE_CFLAGS) $(GTK_X11_CFLAGS) -mini_wm_LDFLAGS = $(X11_LIBS) $(XCOMPOSITE_LIBS) $(GTK_X11_LIBS) -mini_wm_SOURCES = mini-wm.c - udevdir = /lib/udev/rules.d dist_udev_DATA = 70-anaconda.rules diff --git a/anaconda.spec.in b/anaconda.spec.in index 17bb79e12..076f6a3f8 100644 --- a/anaconda.spec.in +++ b/anaconda.spec.in @@ -198,7 +198,6 @@ update-desktop-database &> /dev/null || : %doc docs/mediacheck.txt %doc docs/anaconda-release-notes.txt /lib/udev/rules.d/70-anaconda.rules -%{_bindir}/mini-wm %{_sbindir}/anaconda %ifarch i386 i486 i586 i686 x86_64 %{_sbindir}/gptsync diff --git a/mini-wm.c b/mini-wm.c deleted file mode 100644 index 77561797e..000000000 --- a/mini-wm.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * mini-wm.c - simple keyboard focus handling 'wm'. - * - * Copyright (C) 2002 Red Hat, Inc. All rights reserved. - * - * 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, see <http://www.gnu.org/licenses/>. - * - * Author(s): Owen Taylor <otaylor@redhat.com> - */ - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> - -#include <gdk/gdkx.h> -#include <gtk/gtk.h> -#include <X11/extensions/Xcomposite.h> - -static gboolean -is_focusable (Window window) -{ - Display *xdisplay = GDK_DISPLAY (); - XWindowAttributes xwa; - gboolean result = FALSE; - - gdk_error_trap_push (); - if (XGetWindowAttributes (xdisplay, window, &xwa)) - { - if (!xwa.override_redirect && xwa.map_state == IsViewable) - result = TRUE; - } - gdk_error_trap_pop (); - - return result; -} - -static void -check_focus () -{ - Window *children; - unsigned int n_children; - Window root; - Window parent; - - XQueryTree (GDK_DISPLAY(), GDK_ROOT_WINDOW(), - &root, &parent, &children, &n_children); - - while (n_children > 0) { - if (is_focusable (children[n_children-1])) { - gdk_error_trap_push (); - XSetInputFocus (GDK_DISPLAY(), children[n_children-1], - RevertToPointerRoot, CurrentTime); - XSync (GDK_DISPLAY(), 0); - if (gdk_error_trap_pop () == 0) - break; - } - n_children--; - } - - XFree (children); -} - -GdkFilterReturn -mini_wm_root_filter (GdkXEvent *xevent, - GdkEvent *event, - gpointer data) -{ - XEvent *xev = xevent; - - if (xev->xany.type == MapNotify || - xev->xany.type == UnmapNotify || - xev->xany.type == ConfigureNotify || - xev->xany.type == DestroyNotify) - { - check_focus (); - } - - return GDK_FILTER_CONTINUE; -} - -void -mini_wm_start (void) -{ - XWindowAttributes attrs; - - XCompositeRedirectSubwindows (GDK_DISPLAY(), GDK_ROOT_WINDOW(), - CompositeRedirectAutomatic); - - XGetWindowAttributes (GDK_DISPLAY(), GDK_ROOT_WINDOW(), &attrs); - XSelectInput (GDK_DISPLAY(), GDK_ROOT_WINDOW(), - attrs.your_event_mask | SubstructureNotifyMask); - - gdk_window_add_filter (GDK_ROOT_PARENT (), mini_wm_root_filter, NULL); - - check_focus (); -} - -int main( int argc, - char *argv[] ) -{ - gtk_init (&argc, &argv); - - mini_wm_start (); - - /* Indicate back to anaconda that we now have established - * connection to the display. */ - if (write(1, "#", 1) == -1) abort(); - - gtk_main(); - - return(0); -} diff --git a/scripts/upd-instroot b/scripts/upd-instroot index 3470b3066..21c6bd62f 100755 --- a/scripts/upd-instroot +++ b/scripts/upd-instroot @@ -538,7 +538,6 @@ usr/bin/lsattr* usr/bin/maketilo usr/bin/md5sum usr/bin/metacity -usr/bin/mini-wm usr/bin/mkzimage usr/bin/pango* usr/bin/python |