mirror of
https://github.com/gryf/wmaker.git
synced 2026-07-07 19:26:39 +02:00
Compare commits
9 Commits
931186bd18
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 774e696270 | |||
| 6c107e0ce5 | |||
| 7c80e917d7 | |||
| 90ce10998c | |||
| f18de447f6 | |||
| b69c9db245 | |||
| 3562ce9d7b | |||
| aa7287efbf | |||
| 5eb3287535 |
+1
-1
@@ -7,7 +7,7 @@ CLEANFILES = $(CATALOGS) $(DOMAIN).pot
|
|||||||
# Please keep this sorted in alphabetic order!
|
# Please keep this sorted in alphabetic order!
|
||||||
EXTRA_DIST = be.po bg.po bs.po ca.po cs.po da.po de.po el.po es.po et.po \
|
EXTRA_DIST = be.po bg.po bs.po ca.po cs.po da.po de.po el.po es.po et.po \
|
||||||
fi.po fr.po fy.po gl.po hr.po hu.po hy.po it.po ja.po ko.po ms.po nl.po \
|
fi.po fr.po fy.po gl.po hr.po hu.po hy.po it.po ja.po ko.po ms.po nl.po \
|
||||||
no.po pl.po pt.po ro.po ru.po sk.po sr.po sv.po tr.po uk.po zh_CN.po \
|
no.po pl.po pt.po pt_BR.po ro.po ru.po sk.po sr.po sv.po tr.po uk.po zh_CN.po \
|
||||||
zh_TW.po
|
zh_TW.po
|
||||||
|
|
||||||
POTFILES = \
|
POTFILES = \
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ File Language Note Current Maintainer
|
|||||||
ja.po Japanese 1 ABE Shige <sabe@ibm.net>
|
ja.po Japanese 1 ABE Shige <sabe@ibm.net>
|
||||||
MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>
|
MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>
|
||||||
Takeo Hashimoto <HashimotoTakeo@mac.com>
|
Takeo Hashimoto <HashimotoTakeo@mac.com>
|
||||||
pt.po Portuguese Eliphas Levy Theodoro <eliphas@conectiva.com.br>
|
pt_BR.po Brazilian Portuguese Eliphas Levy Theodoro <eliphas@conectiva.com.br>
|
||||||
|
pt.po Portuguese Hugo Carvalho <hugokarvalho@hotmail.com>
|
||||||
de.po German Torsten Marek <torsten.marek@vbdnet.de>
|
de.po German Torsten Marek <torsten.marek@vbdnet.de>
|
||||||
Bernd Eggert <Bernd.Eggert@t-online.de>
|
Bernd Eggert <Bernd.Eggert@t-online.de>
|
||||||
Matthias Warkus <mawarkus@t-online.de>
|
Matthias Warkus <mawarkus@t-online.de>
|
||||||
|
|||||||
+1776
File diff suppressed because it is too large
Load Diff
+11
-1
@@ -1143,6 +1143,7 @@ static XImage *imageCaptureArea(WScreen *scr)
|
|||||||
GrabModeAsync, None, wPreferences.cursor[WCUR_CAPTURE], CurrentTime) != Success) {
|
GrabModeAsync, None, wPreferences.cursor[WCUR_CAPTURE], CurrentTime) != Success) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
XGrabKeyboard(dpy, scr->root_win, False, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
|
|
||||||
XGrabServer(dpy);
|
XGrabServer(dpy);
|
||||||
|
|
||||||
@@ -1162,12 +1163,17 @@ static XImage *imageCaptureArea(WScreen *scr)
|
|||||||
if (w > 0 && h > 0) {
|
if (w > 0 && h > 0) {
|
||||||
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
|
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
|
||||||
XUngrabServer(dpy);
|
XUngrabServer(dpy);
|
||||||
|
XUngrabKeyboard(dpy, CurrentTime);
|
||||||
XUngrabPointer(dpy, CurrentTime);
|
XUngrabPointer(dpy, CurrentTime);
|
||||||
return XGetImage(dpy, scr->root_win, x, y, w, h, AllPlanes, ZPixmap);
|
return XGetImage(dpy, scr->root_win, x, y, w, h, AllPlanes, ZPixmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
|
/* drop stale root MotionNotify still queued from before
|
||||||
|
* the grab, otherwise the rectangle anchors at (-1,-1) */
|
||||||
|
if (xp < 0)
|
||||||
|
break;
|
||||||
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
|
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
|
||||||
x = event.xmotion.x_root;
|
x = event.xmotion.x_root;
|
||||||
if (x < xp) {
|
if (x < xp) {
|
||||||
@@ -1186,8 +1192,11 @@ static XImage *imageCaptureArea(WScreen *scr)
|
|||||||
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
|
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
|
||||||
break;
|
break;
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
if (W_KeycodeToKeysym(dpy, event.xkey.keycode, 0) == XK_Escape)
|
if (W_KeycodeToKeysym(dpy, event.xkey.keycode, 0) == XK_Escape) {
|
||||||
|
if (w > 0 && h > 0)
|
||||||
|
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
|
||||||
quit = 1;
|
quit = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WMHandleEvent(&event);
|
WMHandleEvent(&event);
|
||||||
@@ -1196,6 +1205,7 @@ static XImage *imageCaptureArea(WScreen *scr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XUngrabServer(dpy);
|
XUngrabServer(dpy);
|
||||||
|
XUngrabKeyboard(dpy, CurrentTime);
|
||||||
XUngrabPointer(dpy, CurrentTime);
|
XUngrabPointer(dpy, CurrentTime);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -387,7 +387,6 @@ static char *atomNames[] = {
|
|||||||
"_WINDOWMAKER_COMMAND",
|
"_WINDOWMAKER_COMMAND",
|
||||||
"_WINDOWMAKER_ICON_SIZE",
|
"_WINDOWMAKER_ICON_SIZE",
|
||||||
"_WINDOWMAKER_ICON_TILE",
|
"_WINDOWMAKER_ICON_TILE",
|
||||||
"_WINDOWMAKER_MARK_KEY",
|
|
||||||
|
|
||||||
GNUSTEP_WM_ATTR_NAME,
|
GNUSTEP_WM_ATTR_NAME,
|
||||||
GNUSTEP_WM_MINIATURIZE_WINDOW,
|
GNUSTEP_WM_MINIATURIZE_WINDOW,
|
||||||
@@ -395,7 +394,9 @@ static char *atomNames[] = {
|
|||||||
|
|
||||||
"_GTK_APPLICATION_OBJECT_PATH",
|
"_GTK_APPLICATION_OBJECT_PATH",
|
||||||
|
|
||||||
"WM_IGNORE_FOCUS_EVENTS"
|
"WM_IGNORE_FOCUS_EVENTS",
|
||||||
|
|
||||||
|
"_WINDOWMAKER_MARK_KEY"
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+12
-4
@@ -408,6 +408,8 @@ static RImage *makeRImageFromARGBData(unsigned long *data)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
image = RCreateImage(width, height, True);
|
image = RCreateImage(width, height, True);
|
||||||
|
if (!image)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
for (imgdata = image->data, i = 2; i < size + 2; i++, imgdata += 4) {
|
for (imgdata = image->data, i = 2; i < size + 2; i++, imgdata += 4) {
|
||||||
pixel = data[i];
|
pixel = data[i];
|
||||||
@@ -458,9 +460,11 @@ static RImage *findBestIcon(unsigned long *data, unsigned long items)
|
|||||||
/* get the current icon's size */
|
/* get the current icon's size */
|
||||||
sx = (int)data[i];
|
sx = (int)data[i];
|
||||||
sy = (int)data[i + 1];
|
sy = (int)data[i + 1];
|
||||||
if ((sx < 1) || (sy < 1))
|
if (sx < 1 || sy < 1 || sx > 4096 || sy > 4096)
|
||||||
|
break;
|
||||||
|
size = (unsigned long)sx * (unsigned long)sy + 2;
|
||||||
|
if ((unsigned long)size > items - i)
|
||||||
break;
|
break;
|
||||||
size = sx * sy + 2;
|
|
||||||
|
|
||||||
/* check the size difference if it's not too large */
|
/* check the size difference if it's not too large */
|
||||||
if ((sx <= wanted) && (sy <= wanted)) {
|
if ((sx <= wanted) && (sy <= wanted)) {
|
||||||
@@ -485,8 +489,12 @@ static RImage *findBestIcon(unsigned long *data, unsigned long items)
|
|||||||
* small image by a small scale. */
|
* small image by a small scale. */
|
||||||
largest = 0;
|
largest = 0;
|
||||||
for (i = 0L; i < items - 1;) {
|
for (i = 0L; i < items - 1;) {
|
||||||
size = (int)data[i] * (int)data[i + 1];
|
sx = (int)data[i];
|
||||||
if (size == 0)
|
sy = (int)data[i + 1];
|
||||||
|
if (sx < 1 || sy < 1 || sx > 4096 || sy > 4096)
|
||||||
|
break;
|
||||||
|
size = (unsigned long)sx * (unsigned long)sy;
|
||||||
|
if ((unsigned long)size + 2 > items - i)
|
||||||
break;
|
break;
|
||||||
if (size > largest) {
|
if (size > largest) {
|
||||||
icon = &data[i];
|
icon = &data[i];
|
||||||
|
|||||||
+45
-16
@@ -811,38 +811,67 @@ static int dummyErrorHandler(Display * dpy, XErrorEvent * err)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setPixmapProperty(Pixmap pixmap)
|
static Bool getRootPixmapAtom(Atom prop, Pixmap *ret)
|
||||||
{
|
{
|
||||||
static Atom prop = 0;
|
|
||||||
Atom type;
|
Atom type;
|
||||||
int format;
|
int format;
|
||||||
unsigned long length, after;
|
unsigned long length, after;
|
||||||
unsigned char *data;
|
unsigned char *data = NULL;
|
||||||
int mode;
|
|
||||||
|
*ret = None;
|
||||||
|
if (XGetWindowProperty(dpy, root, prop, 0L, 1L, False, AnyPropertyType,
|
||||||
|
&type, &format, &length, &after, &data) != Success)
|
||||||
|
return False;
|
||||||
|
if (type == XA_PIXMAP && format == 32 && length == 1 && data) {
|
||||||
|
*ret = *(Pixmap *)data;
|
||||||
|
XFree(data);
|
||||||
|
return True;
|
||||||
|
}
|
||||||
|
if (data)
|
||||||
|
XFree(data);
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void setPixmapProperty(Pixmap pixmap)
|
||||||
|
{
|
||||||
|
static Atom prop = 0;
|
||||||
|
static Atom eprop = 0;
|
||||||
|
Pixmap old_root, old_eset;
|
||||||
|
Bool have_root, have_eset;
|
||||||
|
|
||||||
if (!prop) {
|
if (!prop) {
|
||||||
prop = XInternAtom(dpy, "_XROOTPMAP_ID", False);
|
prop = XInternAtom(dpy, "_XROOTPMAP_ID", False);
|
||||||
|
eprop = XInternAtom(dpy, "ESETROOT_PMAP_ID", False);
|
||||||
}
|
}
|
||||||
|
|
||||||
XGrabServer(dpy);
|
XGrabServer(dpy);
|
||||||
|
|
||||||
/* Clear out the old pixmap */
|
/* Free the previous background pixmap only when both _XROOTPMAP_ID
|
||||||
XGetWindowProperty(dpy, root, prop, 0L, 1L, False, AnyPropertyType,
|
* and ESETROOT_PMAP_ID hold the same XID, that pairing marks a
|
||||||
&type, &format, &length, &after, &data);
|
* RetainPermanent zombie left by a compliant root setter so
|
||||||
|
* XKillClient on it cannot hit a live connection. A bare
|
||||||
if ((type == XA_PIXMAP) && (format == 32) && (length == 1)) {
|
* _XROOTPMAP_ID may come from a tool that closed in Destroy mode,
|
||||||
|
* in which case the client bits of the stored XID can already be
|
||||||
|
* recycled to a live client, including our own dpy, and killing
|
||||||
|
* it produces "X connection broken". */
|
||||||
|
have_root = getRootPixmapAtom(prop, &old_root);
|
||||||
|
have_eset = getRootPixmapAtom(eprop, &old_eset);
|
||||||
|
if (have_root && have_eset && old_root == old_eset && old_eset != None) {
|
||||||
XSetErrorHandler(dummyErrorHandler);
|
XSetErrorHandler(dummyErrorHandler);
|
||||||
XKillClient(dpy, *((Pixmap *) data));
|
XKillClient(dpy, old_eset);
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
XSetErrorHandler(NULL);
|
XSetErrorHandler(NULL);
|
||||||
mode = PropModeReplace;
|
|
||||||
} else {
|
|
||||||
mode = PropModeAppend;
|
|
||||||
}
|
}
|
||||||
if (pixmap)
|
|
||||||
XChangeProperty(dpy, root, prop, XA_PIXMAP, 32, mode, (unsigned char *)&pixmap, 1);
|
if (pixmap) {
|
||||||
else
|
XChangeProperty(dpy, root, prop, XA_PIXMAP, 32, PropModeReplace,
|
||||||
|
(unsigned char *)&pixmap, 1);
|
||||||
|
XChangeProperty(dpy, root, eprop, XA_PIXMAP, 32, PropModeReplace,
|
||||||
|
(unsigned char *)&pixmap, 1);
|
||||||
|
} else {
|
||||||
XDeleteProperty(dpy, root, prop);
|
XDeleteProperty(dpy, root, prop);
|
||||||
|
XDeleteProperty(dpy, root, eprop);
|
||||||
|
}
|
||||||
|
|
||||||
XUngrabServer(dpy);
|
XUngrabServer(dpy);
|
||||||
XFlush(dpy);
|
XFlush(dpy);
|
||||||
|
|||||||
Reference in New Issue
Block a user