Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/src/main/java/com/winlator/xserver/ClientOpcodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public abstract class ClientOpcodes {
public static final byte FREE_PIXMAP = 54;
public static final byte CREATE_GC = 55;
public static final byte CHANGE_GC = 56;
public static final byte SET_DASHES = 58;
public static final byte SET_CLIP_RECTANGLES = 59;
public static final byte FREE_GC = 60;
public static final byte COPY_AREA = 62;
Expand Down
14 changes: 8 additions & 6 deletions app/src/main/java/com/winlator/xserver/Drawable.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,15 @@ public void copyArea(short srcX, short srcY, short dstX, short dstY, short width
if ((dstX + width) > this.width) width = (short)(this.width - dstX);
if ((dstY + height) > this.height) height = (short)(this.height - dstY);

if (gcFunction == GraphicsContext.Function.COPY) {
copyArea(srcX, srcY, dstX, dstY, width, height, drawable.getStride(), this.getStride(), drawable.data, this.data);
if (this.data != null && drawable.data != null) {
if (gcFunction == GraphicsContext.Function.COPY) {
copyArea(srcX, srcY, dstX, dstY, width, height, drawable.getStride(), this.getStride(), drawable.data, this.data);
}
else copyAreaOp(srcX, srcY, dstX, dstY, width, height, drawable.getStride(), this.getStride(), drawable.data, this.data, gcFunction.ordinal());

this.data.rewind();
drawable.data.rewind();
}
else copyAreaOp(srcX, srcY, dstX, dstY, width, height, drawable.getStride(), this.getStride(), drawable.data, this.data, gcFunction.ordinal());

this.data.rewind();
drawable.data.rewind();

texture.setNeedsUpdate(true);
if (onDrawListener != null) onDrawListener.run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ else if (inputStream.available() < 4) {
GraphicsContextRequests.changeGC(client, inputStream, outputStream);
}
break;
case ClientOpcodes.SET_DASHES:
client.skipRequest();
break;
case ClientOpcodes.SET_CLIP_RECTANGLES:
client.skipRequest();
break;
Expand Down