Skip to content

Commit

Permalink
Revert last three commits
Browse files Browse the repository at this point in the history
"Display: Add frameGtkExtentsAtom",
"Window: Add clientFrame(), to get the eventually set CSD extents",
"Restore ABI compatibility broken by the previous commit".
  • Loading branch information
XRevan86 committed Mar 24, 2016
1 parent 8f8e6ec commit 03873f3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 53 deletions.
9 changes: 0 additions & 9 deletions include/compiz-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,6 @@ struct _CompDisplay {
Atom clientListStackingAtom;

Atom frameExtentsAtom;
Atom frameGtkExtentsAtom;
Atom frameWindowAtom;

Atom wmStateAtom;
Expand Down Expand Up @@ -2639,8 +2638,6 @@ struct _CompWindow {

CompWindowExtents input;
CompWindowExtents output;
/* was placed below for ABI compat reasons */
/* CompWindowExtents clientFrame; */

CompStruts *struts;

Expand Down Expand Up @@ -2689,9 +2686,6 @@ struct _CompWindow {
/* must be set by addWindowGeometry */
DrawWindowGeometryProc drawWindowGeometry;

/* was placed here and not above for ABI compat reasons */
CompWindowExtents clientFrame;

void *reserved;
};

Expand Down Expand Up @@ -2820,9 +2814,6 @@ updateTransientHint (CompWindow *w);
void
updateIconGeometry (CompWindow *w);

void
updateClientFrame (CompWindow *w);

Window
getClientLeader (CompWindow *w);

Expand Down
5 changes: 2 additions & 3 deletions src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -2114,9 +2114,8 @@ addDisplay (const char *name)
d->clientListStackingAtom =
XInternAtom (dpy, "_NET_CLIENT_LIST_STACKING", 0);

d->frameExtentsAtom = XInternAtom (dpy, "_NET_FRAME_EXTENTS", 0);
d->frameGtkExtentsAtom = XInternAtom (dpy, "_GTK_FRAME_EXTENTS", 0);
d->frameWindowAtom = XInternAtom (dpy, "_NET_FRAME_WINDOW", 0);
d->frameExtentsAtom = XInternAtom (dpy, "_NET_FRAME_EXTENTS", 0);
d->frameWindowAtom = XInternAtom (dpy, "_NET_FRAME_WINDOW", 0);

d->wmStateAtom = XInternAtom (dpy, "WM_STATE", 0);
d->wmChangeStateAtom = XInternAtom (dpy, "WM_CHANGE_STATE", 0);
Expand Down
6 changes: 0 additions & 6 deletions src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,12 +1544,6 @@ handleEvent (CompDisplay *d,
if (w)
updateIconGeometry (w);
}
else if (event->xproperty.atom == d->frameGtkExtentsAtom)
{
w = findWindowAtDisplay (d, event->xproperty.window);
if (w)
updateClientFrame (w);
}
else if (event->xproperty.atom == d->winOpacityAtom)
{
w = findWindowAtDisplay (d, event->xproperty.window);
Expand Down
35 changes: 0 additions & 35 deletions src/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,40 +452,6 @@ updateIconGeometry (CompWindow *w)
}
}

void
updateClientFrame (CompWindow *w)
{
Atom actual;
int result, format;
unsigned long n, left;
unsigned char *data;

w->clientFrame.left = 0;
w->clientFrame.right = 0;
w->clientFrame.top = 0;
w->clientFrame.bottom = 0;

result = XGetWindowProperty (w->screen->display->display, w->id,
w->screen->display->frameGtkExtentsAtom,
0L, 65536L, False, XA_CARDINAL,
&actual, &format, &n, &left, &data);

if (result == Success && data)
{
if (n == 4 && actual == XA_CARDINAL)
{
unsigned long *extents = *(unsigned long **) &data;

w->clientFrame.left = extents[0];
w->clientFrame.right = extents[1];
w->clientFrame.top = extents[2];
w->clientFrame.bottom = extents[3];
}

XFree (data);
}
}

static Window
getClientLeaderOfAncestor (CompWindow *w)
{
Expand Down Expand Up @@ -2381,7 +2347,6 @@ addWindow (CompScreen *screen,

recalcWindowActions (w);
updateIconGeometry (w);
updateClientFrame (w);

if (w->shaded)
resizeWindow (w,
Expand Down

0 comments on commit 03873f3

Please sign in to comment.