diff --git a/config.h.in b/config.h.in index de4217ab6..aa79be36e 100644 --- a/config.h.in +++ b/config.h.in @@ -1,4 +1,48 @@ -/* config.h.in. Generated automatically from configure.ac by autoheader. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if using alloca.c. */ +#undef C_ALLOCA + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +#undef CRAY_STACKSEG_END + +/* Define if you have alloca, as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define if you have and it should be used (not on Ultrix). */ +#undef HAVE_ALLOCA_H + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `long' if doesn't define. */ +#undef off_t + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +#undef STACK_DIRECTION + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + #undef ENLIGHTENMENT_VERSION #undef ENLIGHTENMENT_MAJOR #undef ENLIGHTENMENT_MINOR @@ -16,191 +60,81 @@ #undef PACKAGE_LIB_DIR #undef USE_FERITE -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#undef ENABLE_NLS - -/* Define if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - -/* Define if you have the header file. */ -#undef HAVE_ARGZ_H - -/* Define if you have the `dcgettext' function. */ -#undef HAVE_DCGETTEXT - -/* Define if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define if you have the `feof_unlocked' function. */ -#undef HAVE_FEOF_UNLOCKED - -/* Define if you have the `fgets_unlocked' function. */ -#undef HAVE_FGETS_UNLOCKED - -/* Define if you have the `getcwd' function. */ -#undef HAVE_GETCWD - -/* Define if you have the `getegid' function. */ -#undef HAVE_GETEGID - -/* Define if you have the `geteuid' function. */ -#undef HAVE_GETEUID - -/* Define if you have the `getgid' function. */ -#undef HAVE_GETGID - -/* Define if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#undef HAVE_GETTEXT - -/* Define if you have the `getuid' function. */ -#undef HAVE_GETUID - -/* Define if you have the iconv() function. */ -#undef HAVE_ICONV - -/* Define if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define if you have and nl_langinfo(CODESET). */ -#undef HAVE_LANGINFO_CODESET - -/* Define if your file defines LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the `mempcpy' function. */ -#undef HAVE_MEMPCPY - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if you have the `munmap' function. */ -#undef HAVE_MUNMAP - -/* Define if you have the header file. */ -#undef HAVE_NL_TYPES_H - -/* Define if you have the `putenv' function. */ -#undef HAVE_PUTENV - -/* Define if you have the `setenv' function. */ -#undef HAVE_SETENV - -/* Define if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define if you have the header file. */ -#undef HAVE_STDDEF_H - -/* Define if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define if you have the `stpcpy' function. */ -#undef HAVE_STPCPY - -/* Define if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* Define if you have the `strchr' function. */ -#undef HAVE_STRCHR - -/* Define if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define if you have the header file. */ -#undef HAVE_STRING_H - -/* Define if you have the `strtoul' function. */ -#undef HAVE_STRTOUL - -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define if you have the `tsearch' function. */ -#undef HAVE_TSEARCH - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the `__argz_count' function. */ +/* Define if you have the __argz_count function. */ #undef HAVE___ARGZ_COUNT -/* Define if you have the `__argz_next' function. */ +/* Define if you have the __argz_next function. */ #undef HAVE___ARGZ_NEXT -/* Define if you have the `__argz_stringify' function. */ +/* Define if you have the __argz_stringify function. */ #undef HAVE___ARGZ_STRINGIFY -/* Define as const if the declaration of iconv() needs const. */ -#undef ICONV_CONST +/* Define if you have the dcgettext function. */ +#undef HAVE_DCGETTEXT + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + +/* Define if you have the munmap function. */ +#undef HAVE_MUNMAP + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + +/* Define if you have the stpcpy function. */ +#undef HAVE_STPCPY + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strchr function. */ +#undef HAVE_STRCHR + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define if you have the header file. */ +#undef HAVE_NL_TYPES_H + +/* Define if you have the header file. */ +#undef HAVE_STRING_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the i library (-li). */ +#undef HAVE_LIBI /* Name of package */ #undef PACKAGE -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - /* Version number of package */ #undef VERSION /* Define if using the dmalloc debugging malloc package */ #undef WITH_DMALLOC -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define as `__inline' if that's what the C compiler calls it, or to nothing - if it is not supported. */ -#undef inline - -/* Define to `long' if does not define. */ -#undef off_t - -/* Define to `unsigned' if does not define. */ -#undef size_t diff --git a/data/setup/textzone.bits.db b/data/setup/textzone.bits.db index 17fc46c2f..72c35d0bc 100644 Binary files a/data/setup/textzone.bits.db and b/data/setup/textzone.bits.db differ diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 28726a21f..cf3aa8cb7 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -1,18 +1,14 @@ # Makefile for program source directory in GNU NLS utilities package. -# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU General Public License +# be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. PACKAGE = @PACKAGE@ VERSION = @VERSION@ -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - SHELL = /bin/sh @SET_MAKE@ @@ -22,20 +18,24 @@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ -datadir = @datadir@ +datadir = $(prefix)/@DATADIRNAME@ localedir = $(datadir)/locale -gettextsrcdir = $(datadir)/gettext/po +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +DESTDIR = INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` +MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ CC = @CC@ -GMSGFMT = @GMSGFMT@ +GENCAT = @GENCAT@ +GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ -MSGMERGE = msgmerge +XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ +MSGMERGE = PATH=../src:$$PATH msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ @@ -45,17 +45,20 @@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) +SOURCES = cat-id-tbl.c POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ -$(POFILES) $(GMOFILES) +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: -.SUFFIXES: .c .o .po .pox .gmo .mo +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< @@ -69,19 +72,19 @@ CATALOGS = @CATALOGS@ .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ - && rm -f $$file && $(GMSGFMT) --statistics -o $$file $< + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ -all-yes: $(CATALOGS) +all-yes: cat-id-tbl.c $(CATALOGS) all-no: -# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot', -# otherwise packages like GCC can not be built if only parts of the source -# have been downloaded. - -$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in +$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --files-from=$(srcdir)/POTFILES.in \ @@ -89,35 +92,78 @@ $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in || ( rm -f $(srcdir)/$(PACKAGE).pot \ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \ + *) destdir=$(DESTDIR)$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$$destdir/$$lang/LC_MESSAGES; \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done if test "$(PACKAGE)" = "gettext"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ + fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi -install-data-no: all -install-data-yes: all - $(mkinstalldirs) $(DESTDIR)$(datadir) - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ - if test -r $$cat; then \ - $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ - echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \ - else \ - $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ - echo "installing $(srcdir)/$$cat as" \ - "$(DESTDIR)$$dir/$(PACKAGE).mo"; \ - fi; \ - done # Define this as empty until I found a useful application. installcheck: @@ -126,68 +172,76 @@ uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\.gmo$$//'`; \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ done - if test "$(PACKAGE)" = "gettext"; then \ - rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ - else \ - : ; \ - fi + rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in check: all +cat-id-tbl.o: ../intl/libgettext.h + dvi info tags TAGS ID: mostlyclean: - rm -f core core.* *.pox $(PACKAGE).po *.new.po + rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: - $(MAKE) update-po - @$(MAKE) dist2 -# This is a separate target because 'update-po' must be executed before. -dist2: $(DISTFILES) +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ - if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ - cp -p $$dir/$$file $(distdir); \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(PACKAGE).pot - if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \ + PATH=`pwd`/../src:$$PATH; \ cd $(srcdir); \ - catalogs='$(GMOFILES)'; \ + catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\.gmo$$//'`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ echo "$$lang:"; \ - if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \ - mv -f $$lang.new.po $$lang.po; \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ else \ echo "msgmerge for $$cat failed!"; \ - rm -f $$lang.new.po; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ fi; \ done - $(MAKE) update-gmo -update-gmo: Makefile $(GMOFILES) - @: +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) -Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in - cd $(top_builddir) \ +Makefile: Makefile.in.in ../config.status POTFILES + cd .. \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status diff --git a/src/Makefile.am b/src/Makefile.am index 089b8db8d..8aa011397 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,6 +35,7 @@ enlightenment_SOURCES = \ embed.c embed.h \ entry.h entry.c \ exec.h exec.c \ + focus.h focus.c \ file.h file.c \ fs.h fs.c \ $(ferite_c) \ diff --git a/src/border.c b/src/border.c index f63155faf..1b365c6d9 100644 --- a/src/border.c +++ b/src/border.c @@ -11,6 +11,7 @@ #include "util.h" #include "place.h" #include "match.h" +#include "focus.h" /* Window border rendering, querying, setting & modification code */ @@ -408,29 +409,6 @@ e_reparent(Ecore_Event * ev) current_ev = ev; e = ev->event; - { - E_Border *b; - - b = e_border_find_by_window(e->win); -#if 0 - if ((b) && (e->parent_from == b->win.container)) - { - if (b) - { - e_action_stop_by_object(b, NULL, - mouse_win_x, mouse_win_y, - border_mouse_x, border_mouse_y); - OBJ_UNREF(b); - OBJ_IF_FREE(b) - { - ecore_window_reparent(e->win, 0, 0, 0); - e_icccm_release(e->win); - OBJ_FREE(b); - } - } - } -#endif - } current_ev = NULL; D_RETURN; @@ -472,43 +450,44 @@ e_focus_in(Ecore_Event * ev) current_ev = ev; e = ev->event; - D("focus in event\n"); { E_Border *b; b = e_border_find_by_window(e->win); if ((b) && (b->win.client == e->win)) { - D("focus in %s\n", b->client.title); + E_Grab *g; + e_border_focus_grab_ended(); b->current.selected = 1; b->changed = 1; - e_observee_notify_observers(E_OBSERVEE(b), ECORE_EVENT_WINDOW_FOCUS_IN); - + g = b->click_grab; + if (g) { - Evas_List l; - - for (l = b->grabs; l; l = l->next) - { - E_Grab *g; - - g = l->data; - /* find a grab that triggered this */ - if (b->click_grab == g) - { - D("ungrab %s\n", b->client.title); -/* ecore_pointer_ungrab(e->time);*/ - ecore_button_ungrab(b->win.main, g->button, g->mods, g->any_mod); -/* ecore_window_button_grab_auto_replay_set(b->win.main, 0);*/ - free(g); - b->grabs = evas_list_remove(b->grabs, g); - b->click_grab = NULL; - break; - } - } + /* find a grab that triggered this */ + ecore_button_ungrab(b->win.main, g->button, g->mods, g->any_mod); + free(g); + b->click_grab = NULL; } } + /* FUCKED UP: + * look at this debug output: + * f in 800003 + * to: Fukeneh! + * ungrab ctf buttons + * f out 400003 + * from: F..... Oath! + * grab dem buttonz! + * f in 400003 + * to: F..... Oath! + * ungrab ctf buttons + * + * first the focus automatically reverts to Fukeneh (the window) + * now i click on F...... Oath - but i get aofocus out event from + * F..... Oath - it had no focus... but i get a focus out.. i should + * be getting a focus out for fukeneh! + */ } current_ev = NULL; @@ -525,7 +504,6 @@ e_focus_out(Ecore_Event * ev) current_ev = ev; e = ev->event; - D("focus out event\n"); { E_Border *b; @@ -536,11 +514,12 @@ e_focus_out(Ecore_Event * ev) E_CFG_INT(cfg_focus_mode, "settings", "/focus/mode", 0); E_CONFIG_INT_GET(cfg_focus_mode, focus_mode); - D("focus out %s\n", b->client.title); b->current.selected = 0; if (e->key_grab) b->current.select_lost_from_grab = 1; /* settings - click to focus would affect grabs */ - if ((!b->client.internal) && (focus_mode == 2)) /* click to focus */ + if ((!b->client.internal) && + (focus_mode == 2) && + (e_focus_can_focus(b))) { E_Grab *g; @@ -550,9 +529,7 @@ e_focus_out(Ecore_Event * ev) g->mods = ECORE_EVENT_KEY_MODIFIER_NONE; g->any_mod = 0; g->remove_after = 1; - b->grabs = evas_list_append(b->grabs, g); - D("grab me baaaybe %8x | %s\n", b->win.client, b->client.title); - ecore_button_grab(b->win.main, 0, XEV_BUTTON_PRESS | XEV_BUTTON_RELEASE, ECORE_EVENT_KEY_MODIFIER_NONE, 0); + ecore_button_grab(b->win.main, 0, XEV_BUTTON_PRESS, ECORE_EVENT_KEY_MODIFIER_NONE, 0); ecore_window_button_grab_auto_replay_set(b->win.main, e_border_replay_query); b->click_grab = g; } @@ -595,8 +572,6 @@ e_mouse_down(Ecore_Event * ev) Ecore_Event_Mouse_Down *e; D_ENTER; - - D("doooown\n"); current_ev = ev; e = ev->event; { @@ -608,7 +583,6 @@ e_mouse_down(Ecore_Event * ev) mouse_y = e->ry; mouse_buttons |= (1 << e->button); b = e_border_find_by_window(e->win); - D("%p (%x)\n", b, e->win); if (b) { int focus_mode; @@ -616,7 +590,11 @@ e_mouse_down(Ecore_Event * ev) E_CONFIG_INT_GET(cfg_focus_mode, focus_mode); if (focus_mode == 2) - ecore_focus_to_window(b->win.client); + { + e_focus_set_focus(b); + /* FIXME: if (raise on click to focus) ... */ + e_border_raise(b); + } if (e->win == b->win.main) e_cb_border_mouse_down(b, ev); else { @@ -1060,18 +1038,13 @@ e_cb_border_mouse_in(E_Border *b, Ecore_Event *e) E_CFG_INT(cfg_focus_mode, "settings", "/focus/mode", 0); D_ENTER; - -/* if (border_mouse_buttons) D_RETURN;*/ E_CONFIG_INT_GET(cfg_focus_mode, focus_mode); /* pointer focus stuff */ if (focus_mode == 0) - { - if (b->client.takes_focus) ecore_focus_to_window(b->win.client); - } + e_focus_set_focus(b); border_mouse_x = mouse_x; border_mouse_y = mouse_y; -/* border_mouse_buttons = mouse_buttons;*/ if (!current_ev) D_RETURN; x = ((Ecore_Event_Window_Enter *)(e->event))->x; @@ -1090,18 +1063,13 @@ e_cb_border_mouse_out(E_Border *b, Ecore_Event *e) { int x, y; char *class = "Window_Grab"; - -/* if (border_mouse_buttons) D_RETURN; */ - /* pointer focus stuff */ -/* ecore_focus_to_window(0);*/ - + D_ENTER; - + x = mouse_x; y = mouse_y; border_mouse_x = mouse_x; - border_mouse_y = mouse_y; -/* border_mouse_buttons = mouse_buttons; */ + border_mouse_y = mouse_y; if (!current_ev) D_RETURN; e_action_stop(class, ACT_MOUSE_OUT, 0, NULL, ECORE_EVENT_KEY_MODIFIER_NONE, @@ -1126,11 +1094,8 @@ e_cb_border_mouse_down(E_Border *b, Ecore_Event *e) ecore_pointer_grab(b->win.main, CurrentTime); border_mouse_x = mouse_x; border_mouse_y = mouse_y; - D("%i\n", border_mouse_buttons); -/* if (border_mouse_buttons) D_RETURN; */ -/* border_mouse_buttons = mouse_buttons; */ - D("%p\n", current_ev); if (!current_ev) D_RETURN; + x = ((Ecore_Event_Mouse_Down *)(e->event))->x; y = ((Ecore_Event_Mouse_Down *)(e->event))->y; bt = ((Ecore_Event_Mouse_Down *)(e->event))->button; @@ -1149,13 +1114,10 @@ e_cb_border_mouse_down(E_Border *b, Ecore_Event *e) ((g->any_mod) || (((Ecore_Event_Mouse_Down *)(e->event))->mods == g->mods))) { - if (b->click_grab == g) b->click_grab = NULL; if (g->remove_after) { - D("pfft ungrab %s\n", b->client.title); ecore_button_ungrab(b->win.main, g->button, g->mods, g->any_mod); ecore_window_button_grab_auto_replay_set(b->win.main, NULL); - ecore_pointer_ungrab(((Ecore_Event_Mouse_Up *)(e->event))->time); free(g); b->grabs = evas_list_remove(b->grabs, g); goto again; @@ -1163,7 +1125,6 @@ e_cb_border_mouse_down(E_Border *b, Ecore_Event *e) } } } - D("(...e_cb_border_mouse_down...)\n"); { E_Action_Type act; Ecore_Event_Key_Modifiers mods; @@ -1180,14 +1141,10 @@ e_cb_border_mouse_down(E_Border *b, Ecore_Event *e) x, y, border_mouse_x, border_mouse_y); if (!e_action_start(class, act, bt, NULL, mods, E_OBJECT(b), NULL, x, y, border_mouse_x, border_mouse_y)) - { - ecore_pointer_ungrab(((Ecore_Event_Mouse_Down *)(e->event))->time); - } + ecore_pointer_ungrab(((Ecore_Event_Mouse_Down *)(e->event))->time); else - { - ecore_pointer_grab(((Ecore_Event_Mouse_Down *)(e->event))->win, - ((Ecore_Event_Mouse_Down *)(e->event))->time); - } + ecore_pointer_grab(((Ecore_Event_Mouse_Down *)(e->event))->win, + ((Ecore_Event_Mouse_Down *)(e->event))->time); } D_RETURN; @@ -1201,11 +1158,12 @@ e_cb_border_mouse_up(E_Border *b, Ecore_Event *e) D_ENTER; - ecore_pointer_ungrab(CurrentTime); border_mouse_x = mouse_x; border_mouse_y = mouse_y; -/* border_mouse_buttons = mouse_buttons; */ + if (!current_ev) D_RETURN; + ecore_pointer_ungrab(((Ecore_Event_Mouse_Up *)(e->event))->time); + x = ((Ecore_Event_Mouse_Up *)(e->event))->x; y = ((Ecore_Event_Mouse_Up *)(e->event))->y; bt = ((Ecore_Event_Mouse_Up *)(e->event))->button; @@ -1758,12 +1716,6 @@ e_border_new(void) ecore_window_raise(b->win.input); ecore_window_raise(b->win.container); -/* - ecore_window_raise(b->win.l); - ecore_window_raise(b->win.r); - ecore_window_raise(b->win.t); - ecore_window_raise(b->win.b); -*/ evases = evas_list_append(evases, b->evas.l); evases = evas_list_append(evases, b->evas.r); @@ -1787,7 +1739,6 @@ e_border_new(void) D_RETURN_(b); } - void e_border_remove_mouse_grabs(E_Border *b) { @@ -1802,13 +1753,13 @@ e_border_remove_mouse_grabs(E_Border *b) E_Grab *g; g = l->data; - D("nooo grabs\n"); ecore_button_ungrab(b->win.main, g->button, g->mods, g->any_mod); FREE(g); } evas_list_free(b->grabs); b->grabs = NULL; } + b->click_grab = NULL; D_RETURN; } @@ -1823,7 +1774,6 @@ e_border_remove_click_grab(E_Border *b) E_Grab *g; g = b->click_grab; - b->grabs = evas_list_remove(b->grabs, b->click_grab); ecore_button_ungrab(b->win.main, g->button, g->mods, g->any_mod); ecore_window_button_grab_auto_replay_set(b->win.main, NULL); b->click_grab = NULL; @@ -1848,24 +1798,21 @@ e_border_attach_mouse_grabs(E_Border *b) grabs_db = e_config_get("grabs"); /* settings - click to focus would affect grabs */ - if ((!b->current.selected)) + if ((!b->current.selected) && + (e_focus_can_focus(b)) && + (focus_mode == 2)) { - if (focus_mode == 2) /* click to focus */ - { - E_Grab *g; - - g = NEW(E_Grab, 1); - ZERO(g, E_Grab, 1); - g->button = 0; - g->mods = ECORE_EVENT_KEY_MODIFIER_NONE; - g->any_mod = 0; - g->remove_after = 1; - b->grabs = evas_list_append(b->grabs, g); - D("attach... grab me baaaybe %8x | %s\n", b->win.client, b->client.title); - ecore_button_grab(b->win.main, 0, XEV_BUTTON_PRESS | XEV_BUTTON_RELEASE, ECORE_EVENT_KEY_MODIFIER_NONE, 0); - ecore_window_button_grab_auto_replay_set(b->win.main, e_border_replay_query); - b->click_grab = g; - } + E_Grab *g; + + g = NEW(E_Grab, 1); + ZERO(g, E_Grab, 1); + g->button = 0; + g->mods = ECORE_EVENT_KEY_MODIFIER_NONE; + g->any_mod = 0; + g->remove_after = 1; + ecore_button_grab(b->win.main, 0, XEV_BUTTON_PRESS, ECORE_EVENT_KEY_MODIFIER_NONE, 0); + ecore_window_button_grab_auto_replay_set(b->win.main, e_border_replay_query); + b->click_grab = g; } /* other grabs - liek alt+left to move */ @@ -2708,15 +2655,6 @@ e_border_current_focused(void) Evas_List l; D_ENTER; - - for (l = borders; l; l = l->next) - { - E_Border *b; - - b = l->data; - D("%s: %i | %i\n", b->client.title, - b->current.selected, b->current.select_lost_from_grab); - } for (l = borders; l; l = l->next) { E_Border *b; @@ -2824,11 +2762,6 @@ e_border_raise_next(void) current = (E_Border *)next->data; } - D("current desk coords %d, %d, real dim %d, %d\n", current->desk->x, - current->desk->y, current->desk->real.w, current->desk->real.h); - D("current coords %d, %d\n", current->current.x, - current->current.y); - e_border_raise(current); e_border_send_pointer(current); diff --git a/src/focus.c b/src/focus.c new file mode 100644 index 000000000..3409f9fd8 --- /dev/null +++ b/src/focus.c @@ -0,0 +1,35 @@ +#include "focus.h" + +static Evas_List focus_list = NULL; + +void +e_focus_set_focus(E_Border *b) +{ + if (e_focus_can_focus(b)) ecore_focus_to_window(b->win.client); +} + +int +e_focus_can_focus(E_Border *b) +{ + return (b->client.takes_focus); +} + +void +e_focus_list_border_add(E_Border *b) +{ +} + +void +e_focus_list_border_del(E_Border *b) +{ +} + +void +e_focus_list_clear(void) +{ + if (focus_list) + { + evas_list_free(focus_list); + focus_list = NULL; + } +} diff --git a/src/focus.h b/src/focus.h new file mode 100644 index 000000000..d88c8c21b --- /dev/null +++ b/src/focus.h @@ -0,0 +1,14 @@ +#ifndef E_FOCUS_H +#define E_FOCUS_H + +#include "e.h" +#include "border.h" + +void e_focus_set_focus(E_Border *b); +int e_focus_can_focus(E_Border *b); +void e_focus_list_border_add(E_Border *b); +void e_focus_list_border_del(E_Border *b); +void e_focus_list_clear(void); + +#endif + diff --git a/tools/e_setup.c b/tools/e_setup.c index 58d0d553e..5e0a8bec7 100644 --- a/tools/e_setup.c +++ b/tools/e_setup.c @@ -755,18 +755,18 @@ setup(void) txz = txz_new ((root_w - 512) / 2, 130, - "9c Enlightenment\n" - "5c \n" - "5c Welcome to Enlightenment 0.17 (pre-release). This is the setup\n" - "5c program. It will help you get a base configuration initialised\n" - "5c for your user and do some initial tweaks and system queries.\n" - "5c \n" - "5c Please be patient and read the dialogs carefully, as your answers\n" - "5c to questions posed will affect your initial setup of Enlightenment,\n" - "5c and so your initial impressions.\n" - "5c \n" - "5c N.B. - during pre-release stages, this setup program may come up\n" - "5c more than just once, as new setups need to be installed\n" + "6c Enlightenment\n" + "3c \n" + "3c Welcome to Enlightenment 0.17 (pre-release). This is the setup\n" + "3c program. It will help you get a base configuration initialised\n" + "3c for your user and do some initial tweaks and system queries.\n" + "3c \n" + "3c Please be patient and read the dialogs carefully, as your answers\n" + "3c to questions posed will affect your initial setup of Enlightenment,\n" + "3c and so your initial impressions.\n" + "3c \n" + "3c N.B. - during pre-release stages, this setup program may come up\n" + "3c more than just once, as new setups need to be installed\n" ); } {