mirror of
https://github.com/gryf/wmaker.git
synced 2026-07-06 18:56:36 +02:00
Compare commits
6 Commits
aa7287efbf
...
6c107e0ce5
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c107e0ce5 | |||
| 7c80e917d7 | |||
| 90ce10998c | |||
| f18de447f6 | |||
| b69c9db245 | |||
| 3562ce9d7b |
+1
-1
@@ -7,7 +7,7 @@ CLEANFILES = $(CATALOGS) $(DOMAIN).pot
|
||||
# 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 \
|
||||
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
|
||||
|
||||
POTFILES = \
|
||||
|
||||
@@ -3,7 +3,8 @@ File Language Note Current Maintainer
|
||||
ja.po Japanese 1 ABE Shige <sabe@ibm.net>
|
||||
MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>
|
||||
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>
|
||||
Bernd Eggert <Bernd.Eggert@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) {
|
||||
return NULL;
|
||||
}
|
||||
XGrabKeyboard(dpy, scr->root_win, False, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||
|
||||
XGrabServer(dpy);
|
||||
|
||||
@@ -1162,12 +1163,17 @@ static XImage *imageCaptureArea(WScreen *scr)
|
||||
if (w > 0 && h > 0) {
|
||||
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
|
||||
XUngrabServer(dpy);
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
return XGetImage(dpy, scr->root_win, x, y, w, h, AllPlanes, ZPixmap);
|
||||
}
|
||||
}
|
||||
break;
|
||||
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);
|
||||
x = event.xmotion.x_root;
|
||||
if (x < xp) {
|
||||
@@ -1186,8 +1192,11 @@ static XImage *imageCaptureArea(WScreen *scr)
|
||||
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, x, y, w, h);
|
||||
break;
|
||||
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;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WMHandleEvent(&event);
|
||||
@@ -1196,6 +1205,7 @@ static XImage *imageCaptureArea(WScreen *scr)
|
||||
}
|
||||
|
||||
XUngrabServer(dpy);
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+3
-2
@@ -387,7 +387,6 @@ static char *atomNames[] = {
|
||||
"_WINDOWMAKER_COMMAND",
|
||||
"_WINDOWMAKER_ICON_SIZE",
|
||||
"_WINDOWMAKER_ICON_TILE",
|
||||
"_WINDOWMAKER_MARK_KEY",
|
||||
|
||||
GNUSTEP_WM_ATTR_NAME,
|
||||
GNUSTEP_WM_MINIATURIZE_WINDOW,
|
||||
@@ -395,7 +394,9 @@ static char *atomNames[] = {
|
||||
|
||||
"_GTK_APPLICATION_OBJECT_PATH",
|
||||
|
||||
"WM_IGNORE_FOCUS_EVENTS"
|
||||
"WM_IGNORE_FOCUS_EVENTS",
|
||||
|
||||
"_WINDOWMAKER_MARK_KEY"
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
+18
-23
@@ -781,8 +781,12 @@ static Pixmap duplicatePixmap(Pixmap pixmap, int width, int height)
|
||||
Display *tmpDpy;
|
||||
Pixmap copyP;
|
||||
|
||||
/* must open a new display or the RetainPermanent will
|
||||
* leave stuff allocated in RContext unallocated after exit */
|
||||
/* Open a separate connection so the pixmap survives our exit.
|
||||
* RetainTemporary (not RetainPermanent) is used intentionally:
|
||||
* the pixmap lives until the X session ends, avoiding the need
|
||||
* for XKillClient() on old pixmaps (which can crash when the
|
||||
* X server reuses a client ID that now belongs to our own
|
||||
* connection, causing "X connection broken"). */
|
||||
tmpDpy = XOpenDisplay(display);
|
||||
if (!tmpDpy) {
|
||||
wwarning("could not open display to update background image information");
|
||||
@@ -795,21 +799,13 @@ static Pixmap duplicatePixmap(Pixmap pixmap, int width, int height)
|
||||
XCopyArea(tmpDpy, pixmap, copyP, DefaultGC(tmpDpy, scr), 0, 0, width, height, 0, 0);
|
||||
XSync(tmpDpy, False);
|
||||
|
||||
XSetCloseDownMode(tmpDpy, RetainPermanent);
|
||||
XSetCloseDownMode(tmpDpy, RetainTemporary);
|
||||
XCloseDisplay(tmpDpy);
|
||||
}
|
||||
|
||||
return copyP;
|
||||
}
|
||||
|
||||
static int dummyErrorHandler(Display * dpy, XErrorEvent * err)
|
||||
{
|
||||
/* Parameter not used, but tell the compiler that it is ok */
|
||||
(void) dpy;
|
||||
(void) err;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void setPixmapProperty(Pixmap pixmap)
|
||||
{
|
||||
@@ -818,7 +814,6 @@ static void setPixmapProperty(Pixmap pixmap)
|
||||
int format;
|
||||
unsigned long length, after;
|
||||
unsigned char *data;
|
||||
int mode;
|
||||
|
||||
if (!prop) {
|
||||
prop = XInternAtom(dpy, "_XROOTPMAP_ID", False);
|
||||
@@ -826,21 +821,21 @@ static void setPixmapProperty(Pixmap pixmap)
|
||||
|
||||
XGrabServer(dpy);
|
||||
|
||||
/* Clear out the old pixmap */
|
||||
/* Read and discard the old property data. We no longer call
|
||||
* XKillClient() on the old pixmap: since duplicatePixmap() uses
|
||||
* RetainTemporary, old pixmaps are freed automatically when the
|
||||
* X session ends. Calling XKillClient() here was unsafe because
|
||||
* the X server reuses client IDs; if the stored resource ID was
|
||||
* reassigned to our own connection the server would kill us,
|
||||
* producing "X connection to :0 broken". */
|
||||
XGetWindowProperty(dpy, root, prop, 0L, 1L, False, AnyPropertyType,
|
||||
&type, &format, &length, &after, &data);
|
||||
if (data)
|
||||
XFree(data);
|
||||
|
||||
if ((type == XA_PIXMAP) && (format == 32) && (length == 1)) {
|
||||
XSetErrorHandler(dummyErrorHandler);
|
||||
XKillClient(dpy, *((Pixmap *) data));
|
||||
XSync(dpy, False);
|
||||
XSetErrorHandler(NULL);
|
||||
mode = PropModeReplace;
|
||||
} else {
|
||||
mode = PropModeAppend;
|
||||
}
|
||||
if (pixmap)
|
||||
XChangeProperty(dpy, root, prop, XA_PIXMAP, 32, mode, (unsigned char *)&pixmap, 1);
|
||||
XChangeProperty(dpy, root, prop, XA_PIXMAP, 32, PropModeReplace,
|
||||
(unsigned char *)&pixmap, 1);
|
||||
else
|
||||
XDeleteProperty(dpy, root, prop);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user