~ubuntu-branches/ubuntu/lucid/boinc/lucid

« back to all changes in this revision

Viewing changes to api/windows_opengl.C

  • Committer: Bazaar Package Importer
  • Author(s): Frank S. Thomas, Frank S. Thomas
  • Date: 2008-05-31 08:02:47 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080531080247-4ce890lp2rc768cr
Tags: 6.2.7-1
[ Frank S. Thomas ]
* New upstream release.
  - BOINC Manager: Redraw disk usage charts immediately after connecting to
    a (different) client. (closes: 463823)
* debian/copyright:
  - Added the instructions from debian/README.Debian-source about how
    repackaged BOINC tarballs can be reproduced because DevRef now
    recommends to put this here instead of in the afore-mentioned file.
  - Updated for the new release.
* Removed the obsolete debian/README.Debian-source.
* For consistency upstream renamed the core client and the command tool
  ("boinc_client" to "boinc" and "boinc_cmd" to "boinccmd"). Done the same
  in all packages and created symlinks with the old names for the binaries
  and man pages. Also added an entry in debian/boinc-client.NEWS explaining
  this change.
* debian/rules: Do not list Makefile.ins in the clean target individually,
  just remove all that can be found.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
static bool visible = true;
47
47
static bool window_ready=false;
48
48
static UINT_PTR gfx_timer_id = 0;
 
49
HANDLE graphics_threadh;
49
50
 
50
51
#define GLUT_CTRL_KEY 17
51
52
 
80
81
    }
81
82
}
82
83
 
 
84
 
83
85
void SetupPixelFormat(HDC hDC) {
84
86
   int nPixelFormat;
85
87
 
231
233
        (strcmp(current_desktop.window_station, graphics_msg.window_station) ||
232
234
        strcmp(current_desktop.desktop, graphics_msg.desktop))) {
233
235
 
 
236
        BOINCINFO("Checking Desktop and Window Station Parameters\n");
234
237
        GetDesktopWindow();
235
238
 
236
239
        if (NULL == hOriginalWindowStation) {
252
255
            BOINCINFO("Failed to retrieve the required window station\n");
253
256
            new_mode = MODE_UNSUPPORTED;
254
257
        } else {
255
 
            BOINCTRACE("Retrieved the required window station\n");
256
 
            SetProcessWindowStation(hInteractiveWindowStation);
 
258
            BOINCINFO("Retrieved the required window station\n");
 
259
            if (!SetProcessWindowStation(hInteractiveWindowStation)) {
 
260
                BOINCINFO("Failed to SetProcessWindowStation (GLE: '%d')\n", GetLastError());
 
261
            }
257
262
            hInteractiveDesktop = OpenDesktop(
258
 
                graphics_msg.desktop, NULL, FALSE,
 
263
                graphics_msg.desktop, (DWORD)NULL, FALSE,
259
264
                GENERIC_READ | DESKTOP_CREATEWINDOW | DESKTOP_CREATEMENU
260
265
            );
261
266
            if (NULL == hInteractiveDesktop) {
262
267
                BOINCINFO("Failed to retrieve the required desktop\n");
263
268
                new_mode = MODE_UNSUPPORTED;
264
269
            } else {
265
 
                BOINCTRACE("Retrieved the required desktop\n");
266
 
                SetThreadDesktop(hInteractiveDesktop);
 
270
                BOINCINFO("Retrieved the required desktop\n");
 
271
                if (!SetThreadDesktop(hInteractiveDesktop)) {
 
272
                    BOINCINFO("Failed to SetThreadDesktop (GLE: '%d')\n", GetLastError());
 
273
                }
267
274
            }
268
275
        }
269
276
    }
377
384
        PAINTSTRUCT ps;
378
385
        RECT winRect;
379
386
        HDC pdc;
 
387
        if (!graphics_threadh) graphics_threadh=(HANDLE)GetCurrentThreadId();  
380
388
        pdc = BeginPaint(hWnd, &ps);
381
389
        GetClientRect(hWnd, &winRect);
382
390
        FillRect(pdc, &winRect, (HBRUSH)GetStockObject(BLACK_BRUSH));
503
511
    GetVersionEx(&osvi);
504
512
    is_windows_9x = (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
505
513
 
506
 
    diagnostics_set_thread_name("Graphics");
507
 
    diagnostics_set_thread_graphics();
508
 
 
509
514
    // Register window class and graphics mode message
510
515
    //
511
516
    reg_win_class();
531
536
    SetEvent(hQuitEvent);        // Signal the worker thread that we're quitting
532
537
}
533
538
 
534
 
const char *BOINC_RCSID_462f482d81 = "$Id: windows_opengl.C 12421 2007-04-19 20:53:16Z romw $";
 
539
const char *BOINC_RCSID_462f482d81 = "$Id: windows_opengl.C 13956 2007-10-24 23:49:52Z romw $";