~onli/simdock/master

« back to all changes in this revision

Viewing changes to src/tasks.cc

  • Committer: onli
  • Date: 2012-04-06 23:14:37 UTC
  • Revision ID: git-v1:34faa0ed43dcef74e599624c60200990ab02a65b
Revert "Revert "first step for interactive settings: interactive setting (without specific app-update)""
fighting with git

This reverts commit 6182beada92d1f2c8c5e4ec59e6f06583d6bda4b.

Show diffs side-by-side

added added

removed removed

Lines of Context:
383
383
    {
384
384
      curr_Win = (WnckWindow *) g_list_nth_data (windowz, i);
385
385
      WnckApplication *app = wnck_window_get_application (curr_Win);
386
 
 
387
386
      if (strncmp (name, wnck_application_get_name (app), nameLength) == 0)
388
387
        return wnck_window_get_xid (curr_Win);
389
388
 
390
389
    }
391
390
 
392
391
  return 0;
393
 
 
 
392
}
 
393
 
 
394
Window
 
395
tasks_getFromWindowName (const char *name, int nameLength)
 
396
{
 
397
 
 
398
  if (!name)
 
399
    return 0;
 
400
 
 
401
  WnckScreen *defaultScreen = wnck_screen_get_default ();
 
402
  wnck_screen_force_update (defaultScreen);
 
403
  GList *windowz = wnck_screen_get_windows (defaultScreen);
 
404
 
 
405
  WnckWindow *curr_Win;
 
406
  int l = g_list_length (windowz);
 
407
 
 
408
  for (int i = 0; i < l; i++)
 
409
    {
 
410
      curr_Win = (WnckWindow *) g_list_nth_data (windowz, i);
 
411
      printf("%s \n", wnck_window_get_name (curr_Win));
 
412
      if (strncmp (name, wnck_window_get_name (curr_Win), nameLength) == 0)
 
413
        return wnck_window_get_xid (curr_Win);
 
414
 
 
415
    }
 
416
 
 
417
  return 0;
394
418
}
395
419
 
396
420
void tasks_raise (WnckWindow* win)