Skip to content
Snippets Groups Projects
Commit e5fdb214 authored by Olivier Fourdan's avatar Olivier Fourdan
Browse files

Add little white frame arround the black frame so it stays visible even on dark background,

handle the one single hidden app in cycling.


(Old svn revision: 12002)
parent 0f502949
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-09-27 23:39+0200\n"
"POT-Creation-Date: 2004-09-29 00:08+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -597,32 +597,32 @@ msgstr ""
msgid "%s: Operation not supported (yet)\n"
msgstr ""
#: src/main.c:176
#: src/main.c:177
#, c-format
msgid "%s: Segmentation fault"
msgstr ""
#: src/main.c:414
#: src/main.c:434
#, c-format
msgid "%s: Another Window Manager is already running"
msgstr ""
#: src/main.c:419
#: src/main.c:439
#, c-format
msgid "%s: Missing data from default files"
msgstr ""
#: src/main.c:429
#: src/main.c:449
#, c-format
msgid "%s: Failed to enter daemon mode: %s"
msgstr ""
#: src/main.c:437
#: src/main.c:457
#, c-format
msgid "%s: Failed to create new process: %s"
msgstr ""
#: src/main.c:458
#: src/main.c:478
#, c-format
msgid "%s: Unknown error occured"
msgstr ""
......
......@@ -3691,6 +3691,13 @@ clientCycle (Client * c, XEvent * e)
passdata.cycle_range |= INCLUDE_SKIP_TASKBAR | INCLUDE_SKIP_PAGER;
}
passdata.c = clientGetNext (c, passdata.cycle_range);
/* If there is one single client, and if it's hidden, use it */
if ((passdata.c == NULL) && FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED))
{
passdata.c = c;
}
if (passdata.c)
{
GdkPixbuf *icon;
......
......@@ -27,21 +27,26 @@
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
#include <gdk/gdkx.h>
#include "screen.h"
#include "client.h"
#ifndef OUTLINE_WIDTH
#define OUTLINE_WIDTH 3
#define OUTLINE_WIDTH 5
#endif
void
wireframeUpdate (Client *c, Window xwindow)
{
ScreenInfo *screen_info;
g_return_if_fail (c != NULL);
g_return_if_fail (xwindow != None);
TRACE ("entering wireframeUpdate 0x%lx", xwindow);
screen_info = c->screen_info;
XUnmapWindow (clientGetXDisplay (c), xwindow);
XMoveResizeWindow (clientGetXDisplay (c), xwindow,
frameX (c), frameY (c), frameWidth (c), frameHeight (c));
......@@ -58,7 +63,6 @@ wireframeUpdate (Client *c, Window xwindow)
xrect.y = 0;
xrect.width = frameWidth (c);
xrect.height = frameHeight (c);
XUnionRectWithRegion (&xrect, outer_xregion, outer_xregion);
xrect.x += OUTLINE_WIDTH;
......@@ -75,13 +79,30 @@ wireframeUpdate (Client *c, Window xwindow)
XDestroyRegion (outer_xregion);
XDestroyRegion (inner_xregion);
XMapWindow (clientGetXDisplay (c), xwindow);
XDrawRectangle (clientGetXDisplay (c), xwindow,
gdk_x11_gc_get_xgc (screen_info->white_gc),
0, 0, frameWidth (c) - 1, frameHeight (c) - 1);
XDrawRectangle (clientGetXDisplay (c), xwindow,
gdk_x11_gc_get_xgc (screen_info->white_gc),
OUTLINE_WIDTH - 1, OUTLINE_WIDTH - 1,
frameWidth (c) - 2 * (OUTLINE_WIDTH - 1) - 1,
frameHeight (c)- 2 * (OUTLINE_WIDTH - 1) - 1);
}
else
{
/* Unset the shape */
XShapeCombineMask (clientGetXDisplay (c), xwindow,
ShapeBounding, 0, 0, None, ShapeSet);
XMapWindow (clientGetXDisplay (c), xwindow);
XDrawRectangle (clientGetXDisplay (c), xwindow,
gdk_x11_gc_get_xgc (screen_info->white_gc),
0, 0, frameWidth (c) - 1, frameHeight (c) - 1);
}
XFlush (clientGetXDisplay (c));
}
Window
......@@ -99,7 +120,6 @@ wireframeCreate (Client *c)
attrs.override_redirect = True;
attrs.background_pixel = BlackPixel (clientGetXDisplay (c),
screen_info->screen);
xwindow = XCreateWindow (clientGetXDisplay (c),
screen_info->xroot,
frameX (c), frameY (c),
......@@ -107,9 +127,7 @@ wireframeCreate (Client *c)
0, CopyFromParent, CopyFromParent,
(Visual *) CopyFromParent,
CWOverrideRedirect | CWBackPixel, &attrs);
wireframeUpdate (c, xwindow);
XMapWindow (clientGetXDisplay (c), xwindow);
return (xwindow);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment