-#!/bin/sh
+# This shell script is run before Openbox launches.
+# Environment variables set here are passed to the Openbox session.
# Set a background color
BG=""
if which start_kdeinit >/dev/null; then
LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup &
fi
+
+# Support for SCIM
+if which scim >/dev/null; then
+ export XMODIFIERS=@im=SCIM
+ export GTK_IM_MODULE=scim
+ export QT_IM_MODULE=scim
+ scim -d &
+fi
GLOBALAUTOSTART="@configdir@/openbox/autostart.sh"
if test -e $AUTOSTART; then
- # sleep for 1 second so Openbox is there before anything else
- (sleep 1 && . $AUTOSTART) &
+ . $AUTOSTART
else
if test -e $GLOBALAUTOSTART; then
- # sleep for 1 second so Openbox is there before anything else
- (sleep 1 && . $GLOBALAUTOSTART) &
+ . $GLOBALAUTOSTART
fi
fi
do this after adjusting the frame. otherwise it gets all weird and
clients don't work right */
- client_configure_full(self, self->area.x, self->area.y,
- self->area.width, self->area.height,
- FALSE, TRUE);
+ client_configure(self, self->area.x, self->area.y,
+ self->area.width, self->area.height,
+ FALSE, TRUE);
/* do this after the window is placed, so the premax/prefullscreen numbers
won't be all wacko!!
else l = OB_STACKING_LAYER_ABOVE;
}
else if ((self->fullscreen ||
- /* no decorations and fills the monitor = oldskool fullscreen */
- (self->frame != NULL &&
- self->decorations == 0 &&
- (self->frame->size.right == 0 && self->frame->size.left == 0 &&
- self->frame->size.bottom == 0 && self->frame->size.top == 0 &&
- RECT_EQUAL(self->area,
- *screen_physical_area_monitor
- (client_monitor(self)))))) &&
+ /* No decorations and fills the monitor = oldskool fullscreen.
+ But not for undecorated windows, because the user can do that
+ */
+ (self->decorations == 0 &&
+ !self->undecorated &&
+ RECT_EQUAL(self->area,
+ *screen_physical_area_monitor
+ (client_monitor(self))))) &&
(client_focused(self) || client_search_focus_tree(self)))
l = OB_STACKING_LAYER_FULLSCREEN;
else if (self->above) l = OB_STACKING_LAYER_ABOVE;
}
-void client_configure_full(ObClient *self, gint x, gint y, gint w, gint h,
- gboolean user, gboolean final)
+void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
+ gboolean user, gboolean final)
{
gint oldw, oldh;
gboolean send_resize_client;
gboolean moved = FALSE, resized = FALSE;
+ gboolean fmoved, fresized;
guint fdecor = self->frame->decorations;
gboolean fhorz = self->frame->max_horz;
gint logicalw, logicalh;
}
/* find the frame's dimensions and move/resize it */
+ fmoved = moved;
+ fresized = resized;
if (self->decorations != fdecor || self->max_horz != fhorz)
- moved = resized = TRUE;
- if (moved || resized)
- frame_adjust_area(self->frame, moved, resized, FALSE);
+ fmoved = fresized = TRUE;
+ if (fmoved || fresized)
+ frame_adjust_area(self->frame, fmoved, fresized, FALSE);
if ((!user || (user && final)) && !resized)
{
}
}
}
+
+ /* Grab pointer across these, so it is the same as actions. Enter events
+ won't be generated by the windows moving around */
+ grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
+
if (max_horz != self->max_horz || max_vert != self->max_vert) {
if (max_horz != self->max_horz && max_vert != self->max_vert) {
/* toggling both */
client_shade(self, shaded);
if (undecorated != self->undecorated)
client_set_undecorated(self, undecorated);
+ if (above != self->above || below != self->below) {
+ self->above = above;
+ self->below = below;
+ client_calc_layer(self);
+ }
+
if (modal != self->modal) {
self->modal = modal;
/* when a window changes modality, then its stacking order with its
transients needs to change */
stacking_raise(CLIENT_AS_WINDOW(self));
+
+ /* These things below can change focus so we can't grab pointer for
+ them. Note how we have two ungrab_pointers.. */
+ ungrab_pointer();
+
+ /* it also may get focused. if something is focused that shouldn't
+ be focused anymore, then move the focus */
+ if (focus_client && client_focus_target(focus_client) != focus_client)
+ client_focus(focus_client);
}
+ else
+ /* These things below can change focus so we can't grab pointer for
+ them. Note how we have two ungrab_pointers.. */
+ ungrab_pointer();
+
if (iconic != self->iconic)
client_iconify(self, iconic, FALSE, FALSE);
if (demands_attention != self->demands_attention)
client_hilite(self, demands_attention);
- if (above != self->above || below != self->below) {
- self->above = above;
- self->below = below;
- client_calc_layer(self);
- }
-
client_change_state(self); /* change the hint to reflect these changes */
}
if (self->undecorated != undecorated) {
self->undecorated = undecorated;
client_setup_decor_and_functions(self);
- /* Make sure the client knows it might have moved. Maybe there is a
- * better way of doing this so only one client_configure is sent, but
- * since 125 of these are sent per second when moving the window (with
- * user = FALSE) i doubt it matters much.
- */
- client_configure(self, self->area.x, self->area.y,
- self->area.width, self->area.height, TRUE, TRUE);
client_change_state(self); /* reflect this in the state hints */
}
}
gint w, gint h);
#define client_move(self, x, y) \
- client_configure(self, x, y, self->area.width, self->area.height, \
- TRUE, TRUE)
+ client_configure(self, x, y, self->area.width, self->area.height, TRUE, TRUE)
#define client_resize(self, w, h) \
client_configure(self, self->area.x, self->area.y, w, h, TRUE, TRUE)
#define client_move_resize(self, x, y, w, h) \
client_configure(self, x, y, w, h, TRUE, TRUE)
-#define client_configure(self, x, y, w, h, user, final) \
- client_configure_full(self, x, y, w, h, user, final)
-
/*! Figure out where a window will end up and what size it will be if you
told it to move/resize to these coordinates.
@param force_reply Send a ConfigureNotify to the client regardless of if
the position changed.
*/
-void client_configure_full(ObClient *self, gint x, gint y, gint w, gint h,
- gboolean user, gboolean final);
+void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
+ gboolean user, gboolean final);
void client_reconfigure(ObClient *self);
#include "config.h"
#include "screen.h"
#include "frame.h"
+#include "grab.h"
#include "menu.h"
#include "menuframe.h"
#include "keyboard.h"
if (config) {
client_find_onscreen(client, &x, &y, w, h, FALSE);
- client_configure_full(client, x, y, w, h, FALSE, TRUE);
+
+ /* don't create enter events from clients moving themselves */
+ grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
+ client_configure(client, x, y, w, h, FALSE, TRUE);
+ ungrab_pointer();
}
break;
}
e->xclient.data.l[0] & 1 << 9, y);
client_convert_gravity(client, grav, &x, &y, w, h);
client_find_onscreen(client, &x, &y, w, h, FALSE);
+
+ /* don't create enter events from clients moving themselves */
+ grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
client_configure(client, x, y, w, h, FALSE, TRUE);
+ ungrab_pointer();
} else if (msgtype == prop_atoms.net_restack_window) {
if (e->xclient.data.l[0] != 2) {
ob_debug_type(OB_DEBUG_APP_BUGS,
e->xclient.data.l[2], FALSE);
/* send a synthetic ConfigureNotify, cuz this is supposed
to be like a ConfigureRequest. */
- client_configure_full(client, client->area.x,
- client->area.y,
- client->area.width,
- client->area.height,
- FALSE, TRUE);
+ client_reconfigure(client);
} else
ob_debug_type(OB_DEBUG_APP_BUGS,
"_NET_RESTACK_WINDOW sent for window %s "
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "&Enrotlla"
-
-#~ msgid "&Roll down"
-#~ msgstr "Desen&rotlla"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Posa a so&bre"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "Posa a so&ta"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id necessita un argument\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id necessita un argument\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file necessita un argument\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "No s'ha pogut inicialitzar Xft."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "S'està carregant el tipus de lletra de recanvi: %s\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "A&ufrollen"
-
-#~ msgid "Roll &down"
-#~ msgstr "A&brollen"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "In den &Vordergrund"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "In den &Hintergrund"
-
-#~ msgid "Couldn't set locale from environment."
-#~ msgstr ""
-#~ "Die gewählte Lokalisierung konnte für die Umgebung nicht gesetzt werden"
-
-#~ msgid " --config-file FILE Specify the file to load for the config file\n"
-#~ msgstr ""
-#~ " --config-file FILE Datei, die als Konfigurationsdatei geladen werden "
-#~ "soll\n"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr " --sm-client-id ID ID des Sitzungsmanagers\n"
-
-#~ msgid " --sm-save-file FILE Specify file to load a saved session from\n"
-#~ msgstr ""
-#~ " --sm-save-file FILE Datei von der eine gespeicherte Sitzung geladen "
-#~ "werden soll\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id benötigt ein Argument\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file benötigt ein Argument\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "Xft konnte nicht initialisiert werden"
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Versuche Ersatz-Schriftart %s zu laden\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "&Enrollar"
-
-#~ msgid "Roll down"
-#~ msgstr "Desenrollar"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Poner en p&rimer plano"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "Poner en ú<imo plano"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id necesita un argumento\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id necesita un argumento\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file necesita un argumento\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "No se pudo iniciar Xft."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Intentando recurrir a la fuente: %s\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "&Rullaa"
-
-#~ msgid "Roll &down"
-#~ msgstr "&Rullaa auki"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Nosta &päällimmäiseksi"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "&Laske alimmaiseksi"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id tarvitsee parametrin\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id tarvitsee parametrin\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file tarvitsee parametrin\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "Xft:n käynnistys epäonnistui."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Kokeillaan varakirjasinlajia: %s\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "Enro&uler"
-
-#~ msgid "Roll &down"
-#~ msgstr "Dérou&ler"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Mettre au &premier plan"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "Mettre en &arrière plan"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id requiert un argument\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id requiert un argument\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file requiert un argument\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "Impossible d'initialiser Xft."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Tentative de remplacement de la police : %s\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "Povuci &gore"
-
-#~ msgid "Roll &down"
-#~ msgstr "Spusti &dolje"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Podigni na &vrh"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "Spusti na &dno"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id zahtjeva argument\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id zahtjeva argument\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file zahtjeva argument\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "Nemogu pokrenuti Xft."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Isprobavam osnovni tip slova: %s\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "ロールアップ(&U)"
-
-#~ msgid "Roll &down"
-#~ msgstr "ロールダウン(&R)"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "最上位に上げる(&T)"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "最下位に下げる(&B)"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id には引数が必要です\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id には引数が必要です\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file には引数が必要です\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "Rull &opp"
-
-#~ msgid "Roll &down"
-#~ msgstr "Rull &ned"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Legg ø&verst"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "Legg &nederst"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id krever et argument\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id krever et argument\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file krever et argument\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "Kunde ikke initialisere Xft."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Prøver med reservefonten: %s\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "&Zwiń"
-
-#~ msgid "Roll &down"
-#~ msgstr "R&ozwiń"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Wyślij na &wierzch"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "Wyślij na &spód"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id wymaga argumentu\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id wymaga argumentu\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file wymaga argumentu\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "Błąd przy inicjalizacji Xft."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Próbuję użyć czcionki: %s\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "&Enrolar"
-
-#~ msgid "Roll &down"
-#~ msgstr "Desen&rolar"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Elevar ao &topo"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "Baixar ao f&undo"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id requer um argumento\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id requer um argumento\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file requer um argumento\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "Incapaz de inicializar Xft."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Tentando usar a fonte alternativa: %s\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "Скрутить(&U)"
-
-#~ msgid "Roll &down"
-#~ msgstr "Раскрутить(&W)"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Поднять на передний план(&T)"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "Опустить на задний план(&B)"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id требует параметр\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id требует параметр\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file требует параметр\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "Не удалось инициализировать Xft."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Попытка вернуть шрифт: %s\n"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "&Zvinúť"
-
-#~ msgid "Roll &down"
-#~ msgstr "&Rozvinúť"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "Presunúť navrch"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "Presunúť naspodok"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id vyžaduje parameter\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id vyžaduje parameter\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file vyžaduje parameter\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "Nepodarilo sa inicializovať Xft."
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "Pokus o návrat k fontu: %s\n"
#, c-format
msgid "X Error: %s"
msgstr "X Fel: %s"
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "Rulla &upp"
-
-#~ msgid "Roll &down"
-#~ msgstr "Rull&a ner"
#, c-format
msgid "X Error: %s"
msgstr ""
-
-#, fuzzy
-#~ msgid "Roll &up"
-#~ msgstr "向上捲動(&U)"
-
-#~ msgid "Roll &down"
-#~ msgstr "向下捲動(&W)"
-
-#, fuzzy
-#~ msgid "Raise to &top"
-#~ msgstr "提到最上層(&T)"
-
-#, fuzzy
-#~ msgid "Lower to &bottom"
-#~ msgstr "降到最下層(&B)"
-
-#, fuzzy
-#~ msgid " --sm-client-id ID Specify session management ID\n"
-#~ msgstr "--sm-client-id 要求引數\n"
-
-#~ msgid "--sm-client-id requires an argument\n"
-#~ msgstr "--sm-client-id 要求引數\n"
-
-#~ msgid "--sm-save-file requires an argument\n"
-#~ msgstr "--sm-save-file 要求引數\n"
-
-#~ msgid "Couldn't initialize Xft."
-#~ msgstr "無法初始化 Xft。"
-
-#~ msgid "Trying fallback font: %s\n"
-#~ msgstr "正在嘗試權宜字型:%s\n"