mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-10 18:45:47 +01:00
- fixed problem with WINGs based apps exiting with a "X_RotateProperties"
related error when text was selected in a textfiled (this included WPrefs.app and Window Maker itself). - replaced some malloc's with wmalloc's
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
- fixed problem with WINGs based apps exiting with a "X_RotateProperties"
|
||||
related error when text was selected in a textfiled.
|
||||
|
||||
|
||||
Changes since wmaker 0.64.0:
|
||||
............................
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "WINGsP.h"
|
||||
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/cursorfont.h>
|
||||
|
||||
@@ -583,7 +584,7 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
"WM_STATE"
|
||||
};
|
||||
Atom atoms[sizeof(atomNames)/sizeof(char*)];
|
||||
int i = 0;
|
||||
int i;
|
||||
|
||||
if (!initialized) {
|
||||
|
||||
@@ -616,6 +617,45 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
|
||||
scrPtr->fontCache = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||
|
||||
/* Create missing CUT_BUFFERs */
|
||||
{
|
||||
Atom *rootWinProps;
|
||||
int exists[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
int count;
|
||||
|
||||
rootWinProps = XListProperties(display, scrPtr->rootWin, &count);
|
||||
for (i=0; i<count; i++) {
|
||||
switch(rootWinProps[i]) {
|
||||
case XA_CUT_BUFFER0:
|
||||
exists[0] = 1; break;
|
||||
case XA_CUT_BUFFER1:
|
||||
exists[1] = 1; break;
|
||||
case XA_CUT_BUFFER2:
|
||||
exists[2] = 1; break;
|
||||
case XA_CUT_BUFFER3:
|
||||
exists[3] = 1; break;
|
||||
case XA_CUT_BUFFER4:
|
||||
exists[4] = 1; break;
|
||||
case XA_CUT_BUFFER5:
|
||||
exists[5] = 1; break;
|
||||
case XA_CUT_BUFFER6:
|
||||
exists[6] = 1; break;
|
||||
case XA_CUT_BUFFER7:
|
||||
exists[7] = 1; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (rootWinProps) {
|
||||
XFree(rootWinProps);
|
||||
}
|
||||
for (i=0; i<8; i++) {
|
||||
if (!exists[i]) {
|
||||
XStoreBuffer(display, "", 0, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scrPtr->ignoredModifierMask = 0;
|
||||
{
|
||||
int i;
|
||||
@@ -816,11 +856,8 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
XInternAtoms(display, atomNames, sizeof(atomNames)/sizeof(char*), False,
|
||||
atoms);
|
||||
#else
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < sizeof(atomNames)/sizeof(char*); i++) {
|
||||
atoms[i] = XInternAtom(display, atomNames[i], False);
|
||||
}
|
||||
for (i = 0; i < sizeof(atomNames)/sizeof(char*); i++) {
|
||||
atoms[i] = XInternAtom(display, atomNames[i], False);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -852,15 +889,14 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
scrPtr->wmIconDragOffsetAtom = atoms[i++];
|
||||
|
||||
scrPtr->wmStateAtom = atoms[i++];
|
||||
|
||||
scrPtr->rootView = W_CreateRootView(scrPtr);
|
||||
|
||||
scrPtr->rootView = W_CreateRootView(scrPtr);
|
||||
|
||||
scrPtr->balloon = W_CreateBalloon(scrPtr);
|
||||
|
||||
|
||||
W_InitApplication(scrPtr);
|
||||
|
||||
|
||||
return scrPtr;
|
||||
}
|
||||
|
||||
|
||||
@@ -674,7 +674,7 @@ didResizeTextField(W_ViewDelegate *self, WMView *view)
|
||||
tPtr->offsetWidth =
|
||||
WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font))/2, 1);
|
||||
|
||||
tPtr->usableWidth = tPtr->view->size.width - 2*tPtr->offsetWidth + 2;
|
||||
tPtr->usableWidth = tPtr->view->size.width - 2*tPtr->offsetWidth /*+ 2*/;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user