From c6005c0b33000cd4c96228c523d915c012db54dd Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 28 May 2009 01:08:58 +0100 Subject: [PATCH] Imported upstream version 20090526 --- config.h | 2 +- etc/Makefile | 3 +-- etc/look.lua | 1 + ioncore/clientwin.c | 5 +++-- ioncore/focus.c | 7 ++----- ioncore/focus.h | 2 +- ioncore/frame-draw.c | 3 ++- ioncore/group.c | 2 +- ioncore/window.c | 2 +- mod_tiling/tiling.c | 2 +- 10 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 etc/look.lua diff --git a/config.h b/config.h index e54aba7..5d90d26 100644 --- a/config.h +++ b/config.h @@ -1,4 +1,4 @@ -/* +asdf/* * config.h * * Copyright (c) Tuomo Valkonen 1999-2009. diff --git a/etc/Makefile b/etc/Makefile index 16aa8f4..78179cc 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -11,6 +11,7 @@ include $(TOPDIR)/build/system-inc.mk ETC = cfg_ion.lua cfg_ioncore.lua cfg_kludges.lua cfg_defaults.lua \ cfg_tiling.lua cfg_query.lua cfg_menu.lua \ cfg_statusbar.lua cfg_dock.lua cfg_layouts.lua \ + look.lua \ look_brownsteel.lua look_clean.lua look_dusky.lua \ look_greyviolet.lua look_ios.lua look_cleanviolet.lua \ look_simpleblue.lua look_cleanios.lua look_newviolet.lua \ @@ -24,5 +25,3 @@ include $(TOPDIR)/build/rules.mk ###################################### _install: etc_install - rm -f $(ETCDIR)/look.lua - ln -s look_newviolet.lua $(ETCDIR)/look.lua diff --git a/etc/look.lua b/etc/look.lua new file mode 100644 index 0000000..2484e42 --- /dev/null +++ b/etc/look.lua @@ -0,0 +1 @@ +dopath('look_newviolet') diff --git a/ioncore/clientwin.c b/ioncore/clientwin.c index 11ce290..6ef5561 100644 --- a/ioncore/clientwin.c +++ b/ioncore/clientwin.c @@ -1015,10 +1015,11 @@ static void clientwin_do_set_focus(WClientWin *cwin, bool warp) { if(cwin->flags&CLIENTWIN_P_WM_TAKE_FOCUS){ Time stmp=ioncore_get_timestamp(); + region_finalise_focusing((WRegion*)cwin, cwin->win, warp, stmp); send_clientmsg(cwin->win, ioncore_g.atom_wm_take_focus, stmp); + }else{ + region_finalise_focusing((WRegion*)cwin, cwin->win, warp, CurrentTime); } - - region_finalise_focusing((WRegion*)cwin, cwin->win, warp); XSync(ioncore_g.dpy, 0); } diff --git a/ioncore/focus.c b/ioncore/focus.c index ee3fd86..1ea72a7 100644 --- a/ioncore/focus.c +++ b/ioncore/focus.c @@ -347,7 +347,7 @@ bool region_may_control_focus(WRegion *reg) /*Time ioncore_focus_time=CurrentTime;*/ -void region_finalise_focusing(WRegion* reg, Window win, bool warp) +void region_finalise_focusing(WRegion* reg, Window win, bool warp, Time time) { if(warp) region_do_warp(reg); @@ -356,10 +356,7 @@ void region_finalise_focusing(WRegion* reg, Window win, bool warp) return; region_set_await_focus(reg); - /*xwindow_do_set_focus(win);*/ - XSetInputFocus(ioncore_g.dpy, win, RevertToParent, - CurrentTime/*ioncore_focus_time*/); - /*ioncore_focus_time=CurrentTime;*/ + XSetInputFocus(ioncore_g.dpy, win, RevertToParent, time); } diff --git a/ioncore/focus.h b/ioncore/focus.h index bf7cc06..aab3a82 100644 --- a/ioncore/focus.h +++ b/ioncore/focus.h @@ -23,7 +23,7 @@ extern void region_maybewarp_now(WRegion *reg, bool warp); extern void region_warp(WRegion *reg); /* maybewarp TRUE */ extern void region_set_focus(WRegion *reg); /* maybewarp FALSE */ -extern void region_finalise_focusing(WRegion* reg, Window win, bool warp); +extern void region_finalise_focusing(WRegion* reg, Window win, bool warp, Time time); DYNFUN void region_do_set_focus(WRegion *reg, bool warp); extern void region_do_warp(WRegion *reg); diff --git a/ioncore/frame-draw.c b/ioncore/frame-draw.c index fbe5806..7e404c0 100644 --- a/ioncore/frame-draw.c +++ b/ioncore/frame-draw.c @@ -219,7 +219,8 @@ void frame_set_shape(WFrame *frame) void frame_clear_shape(WFrame *frame) { - grbrush_set_window_shape(frame->brush, TRUE, 0, NULL); + if(frame->brush!=NULL) + grbrush_set_window_shape(frame->brush, TRUE, 0, NULL); } diff --git a/ioncore/group.c b/ioncore/group.c index 3db0795..7e4b1da 100644 --- a/ioncore/group.c +++ b/ioncore/group.c @@ -241,7 +241,7 @@ static void group_do_set_focus(WGroup *ws, bool warp) if(st!=NULL && st->reg!=NULL) region_do_set_focus(st->reg, warp); else - region_finalise_focusing((WRegion*)ws, ws->dummywin, warp); + region_finalise_focusing((WRegion*)ws, ws->dummywin, warp, CurrentTime); } diff --git a/ioncore/window.c b/ioncore/window.c index 42ca028..27f37a0 100644 --- a/ioncore/window.c +++ b/ioncore/window.c @@ -182,7 +182,7 @@ void window_unmap(WWindow *wwin) void window_do_set_focus(WWindow *wwin, bool warp) { - region_finalise_focusing((WRegion*)wwin, wwin->win, warp); + region_finalise_focusing((WRegion*)wwin, wwin->win, warp, CurrentTime); } diff --git a/mod_tiling/tiling.c b/mod_tiling/tiling.c index 48bbb86..733a1e5 100644 --- a/mod_tiling/tiling.c +++ b/mod_tiling/tiling.c @@ -158,7 +158,7 @@ void tiling_unmap(WTiling *ws) void tiling_fallback_focus(WTiling *ws, bool warp) { - region_finalise_focusing((WRegion*)ws, ws->dummywin, warp); + region_finalise_focusing((WRegion*)ws, ws->dummywin, warp, CurrentTime); } -- 2.39.5