File: 30-fix-paint-glitches.patch

package info (click to toggle)
xsol 0.31-11
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 408 kB
  • ctags: 392
  • sloc: ansic: 4,691; makefile: 18
file content (32 lines) | stat: -rw-r--r-- 1,149 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Description: Fix paint glitches when moving cards.
             Delay calling init_cards until score_widget has been managed.
             We also specify a name when creating score_widget (for some
             reason this causes it to be drawn with the correct height).
Author: Graham Inggs <graham@nerve.org.za>
Last-Update: 2013-06-23

--- a/xsol.c
+++ b/xsol.c
@@ -186,19 +186,20 @@
 
    n = 0;
    XtSetArg(args[n], XmNalignment, XmALIGNMENT_END); n++;
-   score_widget = XmCreateLabel(mainwindow, "", args, n);
+   score_widget = XmCreateLabel(mainwindow, "score_widget", args, n);
    XtAppAddTimeOut(app_context, 1000, (XtTimerCallbackProc) timerCB, (XtPointer) app_context);
    XtManageChild(mainwindow);
    XtRealizeWidget(parent);
 
    display = XtDisplay(drawa);
    gc = XCreateGC(display , XtWindow(drawa), 0, (XGCValues *) NULL);
-   init_cards();
 
    XmMainWindowSetAreas(mainwindow, menubar, (Widget) NULL, (Widget) NULL, 
        (Widget) NULL, drawa);
    XtVaSetValues(mainwindow, XmNmessageWindow, score_widget, NULL);
    XtManageChild(score_widget);
+   init_cards();
+
    XtAppMainLoop(app_context);
    return 0;
 }