Merge branch 'backport' into work

Conflicts:
	openbox/event.c
	openbox/frame.c
This commit is contained in:
Mikael Magnusson 2009-01-29 22:45:47 +01:00
commit 4145468a19
15 changed files with 53 additions and 19 deletions

0
install-sh Normal file → Executable file
View file

View file

@ -246,6 +246,8 @@ struct _ObClient
/*! The window uses shape extension to be non-rectangular? */ /*! The window uses shape extension to be non-rectangular? */
gboolean shaped; gboolean shaped;
/*! The window uses shape extension to have non-rectangular input? */
gboolean shaped_input;
/*! The window is modal, so it must be processed before any windows it is /*! The window is modal, so it must be processed before any windows it is
related to can be focused */ related to can be focused */

View file

@ -1576,11 +1576,24 @@ static void event_handle_client(ObClient *client, XEvent *e)
default: default:
; ;
#ifdef SHAPE #ifdef SHAPE
{
int kind;
if (obt_display_extension_shape && if (obt_display_extension_shape &&
e->type == obt_display_extension_shape_basep) e->type == obt_display_extension_shape_basep)
{ {
switch (((XShapeEvent*)e)->kind) {
case ShapeBounding:
case ShapeClip:
client->shaped = ((XShapeEvent*)e)->shaped; client->shaped = ((XShapeEvent*)e)->shaped;
frame_adjust_shape(client->frame); kind = ShapeBounding;
break;
case ShapeInput:
client->shaped_input = ((XShapeEvent*)e)->shaped;
kind = ShapeInput;
break;
}
frame_adjust_shape_kind(client->frame, kind);
}
} }
#endif #endif
} }

View file

@ -265,25 +265,26 @@ void frame_adjust_theme(ObFrame *self)
set_theme_statics(self); set_theme_statics(self);
} }
void frame_adjust_shape(ObFrame *self)
{
#ifdef SHAPE #ifdef SHAPE
void frame_adjust_shape_kind(ObFrame *self, int kind)
{
gint num; gint num;
XRectangle xrect[2]; XRectangle xrect[2];
if (!self->client->shaped) { if (!((kind == ShapeBounding && self->client->shaped) ||
(kind == ShapeInput && self->client->shaped_input))) {
/* clear the shape on the frame window */ /* clear the shape on the frame window */
XShapeCombineMask(obt_display, self->window, ShapeBounding, XShapeCombineMask(obt_display, self->window, kind,
self->size.left, self->size.left,
self->size.top, self->size.top,
None, ShapeSet); None, ShapeSet);
} else { } else {
/* make the frame's shape match the clients */ /* make the frame's shape match the clients */
XShapeCombineShape(obt_display, self->window, ShapeBounding, XShapeCombineShape(obt_display, self->window, kind,
self->size.left, self->size.left,
self->size.top, self->size.top,
self->client->window, self->client->window,
ShapeBounding, ShapeSet); kind, ShapeSet);
num = 0; num = 0;
if (self->decorations & OB_FRAME_DECOR_TITLEBAR) { if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
@ -309,6 +310,14 @@ void frame_adjust_shape(ObFrame *self)
ShapeBounding, 0, 0, xrect, num, ShapeBounding, 0, 0, xrect, num,
ShapeUnion, Unsorted); ShapeUnion, Unsorted);
} }
}
#endif
void frame_adjust_shape(ObFrame *self)
{
#ifdef SHAPE
frame_adjust_shape_kind(self, ShapeBounding);
frame_adjust_shape_kind(self, ShapeInput);
#endif #endif
} }

View file

@ -205,6 +205,9 @@ void frame_free(ObFrame *self);
void frame_show(ObFrame *self); void frame_show(ObFrame *self);
void frame_hide(ObFrame *self); void frame_hide(ObFrame *self);
void frame_adjust_theme(ObFrame *self); void frame_adjust_theme(ObFrame *self);
#ifdef SHAPE
void frame_adjust_shape_kind(ObFrame *self, int kind);
#endif
void frame_adjust_shape(ObFrame *self); void frame_adjust_shape(ObFrame *self);
void frame_adjust_area(ObFrame *self, gboolean moved, void frame_adjust_area(ObFrame *self, gboolean moved,
gboolean resized, gboolean fake); gboolean resized, gboolean fake);

View file

@ -14,6 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: openbox/actions.c:149 #: openbox/actions.c:149
#, c-format #, c-format
@ -435,8 +436,8 @@ msgid_plural ""
"Openbox is configured for %d desktops, but the current session has %d. " "Openbox is configured for %d desktops, but the current session has %d. "
"Overriding the Openbox configuration." "Overriding the Openbox configuration."
msgstr[0] "" msgstr[0] ""
"El Openbox està configurat per a %d escriptori, però la sessió actual en te " "El Openbox està configurat per a %d escriptori, però la sessió actual en te %"
"%d. S'està modificant la configuració del Openbox." "d. S'està modificant la configuració del Openbox."
msgstr[1] "" msgstr[1] ""
"El Openbox està configurat per a %d escriptoris, però la sessió actual en te " "El Openbox està configurat per a %d escriptoris, però la sessió actual en te "
"%d. S'està modificant la configuració del Openbox." "%d. S'està modificant la configuració del Openbox."

View file

@ -14,6 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: openbox/actions.c:149 #: openbox/actions.c:149
#, c-format #, c-format

View file

@ -18,6 +18,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: openbox/actions.c:149 #: openbox/actions.c:149
#, c-format #, c-format
@ -430,8 +431,8 @@ msgid_plural ""
"Openbox is configured for %d desktops, but the current session has %d. " "Openbox is configured for %d desktops, but the current session has %d. "
"Overriding the Openbox configuration." "Overriding the Openbox configuration."
msgstr[0] "" msgstr[0] ""
"Openbox wurde für %d Desktop konfiguriert, aber die aktuelle Sitzung hat %" "Openbox wurde für %d Desktop konfiguriert, aber die aktuelle Sitzung hat %d. "
"d. Überschreibe die Openbox-Konfiguration." "Überschreibe die Openbox-Konfiguration."
msgstr[1] "" msgstr[1] ""
"Openbox wurde für %d Desktops konfiguriert, aber die aktuelle Sitzung hat %" "Openbox wurde für %d Desktops konfiguriert, aber die aktuelle Sitzung hat %"
"d. Überschreibe die Openbox-Konfiguration." "d. Überschreibe die Openbox-Konfiguration."

View file

@ -1,7 +1,7 @@
# English translations for openbox package. # English translations for openbox package.
# Copyright (C) 2008 Dana Jansens # Copyright (C) 2009 Dana Jansens
# This file is distributed under the same license as the openbox package. # This file is distributed under the same license as the openbox package.
# Automatically generated, 2008. # Automatically generated, 2009.
# #
# All this catalog "translates" are quotation characters. # All this catalog "translates" are quotation characters.
# The msgids must be ASCII and therefore cannot contain real quotation # The msgids must be ASCII and therefore cannot contain real quotation

View file

@ -1,7 +1,7 @@
# English translations for openbox package. # English translations for openbox package.
# Copyright (C) 2008 Dana Jansens # Copyright (C) 2009 Dana Jansens
# This file is distributed under the same license as the openbox package. # This file is distributed under the same license as the openbox package.
# Automatically generated, 2008. # Automatically generated, 2009.
# #
# All this catalog "translates" are quotation characters. # All this catalog "translates" are quotation characters.
# The msgids must be ASCII and therefore cannot contain real quotation # The msgids must be ASCII and therefore cannot contain real quotation

View file

@ -18,6 +18,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: openbox/actions.c:149 #: openbox/actions.c:149
#, c-format #, c-format

View file

@ -17,6 +17,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: openbox/actions.c:149 #: openbox/actions.c:149
#, c-format #, c-format

View file

@ -15,6 +15,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: openbox/actions.c:149 #: openbox/actions.c:149
#, c-format #, c-format

View file

@ -14,6 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n" "Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: openbox/actions.c:149 #: openbox/actions.c:149
#, c-format #, c-format

View file

@ -259,7 +259,7 @@ int main(int argc, char **argv)
d = XDisplayName(NULL); d = XDisplayName(NULL);
if (!d) { if (!d) {
fprintf(stderr, fprintf(stderr,
"Unable to fina an X display specified by the DISPLAY " "Unable to find the X display specified by the DISPLAY "
"environment variable. Ensure that it is set correctly."); "environment variable. Ensure that it is set correctly.");
return 1; return 1;
} }