Skip to content
Permalink
Browse files

Don't crash when no WM is present.

CR: Sam Lantinga.
  • Loading branch information
slouken committed Nov 27, 2013
1 parent 8574c08 commit 2bb344d6dc68acd8e9b8687ce2324e89b62e1f91
Showing with 12 additions and 8 deletions.
  1. 0 android-project/src/org/libsdl/app/SDLActivity.java
  2. 0 premake/Linux/SDL_config_premake.h
  3. 0 premake/MinGW/SDL_config_premake.h
  4. 0 premake/VisualC/VS2008/SDL_config_premake.h
  5. 0 premake/VisualC/VS2010/SDL_config_premake.h
  6. 0 premake/VisualC/VS2012/SDL_config_premake.h
  7. 0 premake/Xcode-iOS/SDL_config_premake.h
  8. 0 premake/Xcode/Xcode3/SDL_config_premake.h
  9. 0 premake/Xcode/Xcode4/SDL_config_premake.h
  10. 0 premake/config/SDL_config_cygwin.template.h
  11. 0 premake/config/SDL_config_iphoneos.template.h
  12. 0 premake/config/SDL_config_linux.template.h
  13. 0 premake/config/SDL_config_macosx.template.h
  14. 0 premake/config/SDL_config_minimal.template.h
  15. 0 premake/config/SDL_config_windows.template.h
  16. 0 src/video/SDL_video.c
  17. 0 src/video/windows/SDL_windowsevents.c
  18. 0 src/video/windows/SDL_windowswindow.c
  19. 0 src/video/windows/SDL_windowswindow.h
  20. +12 −8 src/video/x11/SDL_x11video.c
  21. 0 visualtest/config.h
  22. BIN visualtest/docs/html/bc_s.png
  23. BIN visualtest/docs/html/bdwn.png
  24. BIN visualtest/docs/html/closed.png
  25. BIN visualtest/docs/html/doxygen.png
  26. BIN visualtest/docs/html/ftv2blank.png
  27. BIN visualtest/docs/html/ftv2cl.png
  28. BIN visualtest/docs/html/ftv2doc.png
  29. BIN visualtest/docs/html/ftv2folderclosed.png
  30. BIN visualtest/docs/html/ftv2folderopen.png
  31. BIN visualtest/docs/html/ftv2lastnode.png
  32. BIN visualtest/docs/html/ftv2link.png
  33. BIN visualtest/docs/html/ftv2mlastnode.png
  34. BIN visualtest/docs/html/ftv2mnode.png
  35. BIN visualtest/docs/html/ftv2mo.png
  36. BIN visualtest/docs/html/ftv2node.png
  37. BIN visualtest/docs/html/ftv2ns.png
  38. BIN visualtest/docs/html/ftv2plastnode.png
  39. BIN visualtest/docs/html/ftv2pnode.png
  40. BIN visualtest/docs/html/ftv2splitbar.png
  41. BIN visualtest/docs/html/ftv2vertline.png
  42. BIN visualtest/docs/html/nav_f.png
  43. BIN visualtest/docs/html/nav_g.png
  44. BIN visualtest/docs/html/nav_h.png
  45. BIN visualtest/docs/html/open.png
  46. BIN visualtest/docs/html/search/close.png
  47. BIN visualtest/docs/html/search/mag_sel.png
  48. BIN visualtest/docs/html/search/search_l.png
  49. BIN visualtest/docs/html/search/search_m.png
  50. BIN visualtest/docs/html/search/search_r.png
  51. BIN visualtest/docs/html/sync_off.png
  52. BIN visualtest/docs/html/sync_on.png
  53. BIN visualtest/docs/html/tab_a.png
  54. BIN visualtest/docs/html/tab_b.png
  55. BIN visualtest/docs/html/tab_h.png
  56. BIN visualtest/docs/html/tab_s.png
  57. 0 visualtest/include/SDL_visualtest_action_configparser.h
  58. 0 visualtest/include/SDL_visualtest_exhaustive_variator.h
  59. 0 visualtest/include/SDL_visualtest_harness_argparser.h
  60. 0 visualtest/include/SDL_visualtest_mischelper.h
  61. 0 visualtest/include/SDL_visualtest_parsehelper.h
  62. 0 visualtest/include/SDL_visualtest_process.h
  63. 0 visualtest/include/SDL_visualtest_random_variator.h
  64. 0 visualtest/include/SDL_visualtest_rwhelper.h
  65. 0 visualtest/include/SDL_visualtest_screenshot.h
  66. 0 visualtest/include/SDL_visualtest_sut_configparser.h
  67. 0 visualtest/include/SDL_visualtest_variator_common.h
  68. 0 visualtest/include/SDL_visualtest_variators.h
  69. 0 visualtest/src/action_configparser.c
  70. 0 visualtest/src/harness_argparser.c
  71. 0 visualtest/src/linux/linux_process.c
  72. 0 visualtest/src/mischelper.c
  73. 0 visualtest/src/parsehelper.c
  74. 0 visualtest/src/rwhelper.c
  75. 0 visualtest/src/screenshot.c
  76. 0 visualtest/src/sut_configparser.c
  77. 0 visualtest/src/testharness.c
  78. 0 visualtest/src/variator_common.c
  79. 0 visualtest/src/variator_exhaustive.c
  80. 0 visualtest/src/variator_random.c
  81. 0 visualtest/src/variators.c
  82. 0 visualtest/src/windows/windows_process.c
  83. 0 visualtest/src/windows/windows_screenshot.c
  84. 0 visualtest/unittest/testquit.c
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
0 src/video/SDL_video.c 100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
@@ -440,8 +440,8 @@ X11_CheckWindowManager(_THIS)
Atom _NET_SUPPORTING_WM_CHECK;
int status, real_format;
Atom real_type;
unsigned long items_read, items_left;
unsigned char *propdata;
unsigned long items_read = 0, items_left = 0;
unsigned char *propdata = NULL;
Window wm_window = 0;
#ifdef DEBUG_WINDOW_MANAGER
char *wm_name;
@@ -453,20 +453,24 @@ X11_CheckWindowManager(_THIS)

_NET_SUPPORTING_WM_CHECK = X11_XInternAtom(display, "_NET_SUPPORTING_WM_CHECK", False);
status = X11_XGetWindowProperty(display, DefaultRootWindow(display), _NET_SUPPORTING_WM_CHECK, 0L, 1L, False, XA_WINDOW, &real_type, &real_format, &items_read, &items_left, &propdata);
if (status == Success && items_read) {
wm_window = ((Window*)propdata)[0];
}
if (propdata) {
X11_XFree(propdata);
if (status == Success) {
if (items_read) {
wm_window = ((Window*)propdata)[0];
}
if (propdata) {
X11_XFree(propdata);
propdata = NULL;
}
}

if (wm_window) {
status = X11_XGetWindowProperty(display, wm_window, _NET_SUPPORTING_WM_CHECK, 0L, 1L, False, XA_WINDOW, &real_type, &real_format, &items_read, &items_left, &propdata);
if (status != Success || !items_read || wm_window != ((Window*)propdata)[0]) {
wm_window = None;
}
if (propdata) {
if (status == Success && propdata) {
X11_XFree(propdata);
propdata = NULL;
}
}

0 visualtest/config.h 100755 → 100644
Empty file.
0 visualtest/docs/html/bc_s.png 100755 → 100644
Empty file.
0 visualtest/docs/html/bdwn.png 100755 → 100644
Empty file.
0 visualtest/docs/html/closed.png 100755 → 100644
Empty file.
0 visualtest/docs/html/doxygen.png 100755 → 100644
Empty file.
Empty file.
0 visualtest/docs/html/ftv2cl.png 100755 → 100644
Empty file.
0 visualtest/docs/html/ftv2doc.png 100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
0 visualtest/docs/html/ftv2link.png 100755 → 100644
Empty file.
Empty file.
Empty file.
0 visualtest/docs/html/ftv2mo.png 100755 → 100644
Empty file.
0 visualtest/docs/html/ftv2node.png 100755 → 100644
Empty file.
0 visualtest/docs/html/ftv2ns.png 100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
0 visualtest/docs/html/nav_f.png 100755 → 100644
Empty file.
0 visualtest/docs/html/nav_g.png 100755 → 100644
Empty file.
0 visualtest/docs/html/nav_h.png 100755 → 100644
Empty file.
0 visualtest/docs/html/open.png 100755 → 100644
Empty file.
Empty file.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
0 visualtest/docs/html/sync_off.png 100755 → 100644
Diff not rendered.
0 visualtest/docs/html/sync_on.png 100755 → 100644
Diff not rendered.
0 visualtest/docs/html/tab_a.png 100755 → 100644
Diff not rendered.
0 visualtest/docs/html/tab_b.png 100755 → 100644
Diff not rendered.
0 visualtest/docs/html/tab_h.png 100755 → 100644
Diff not rendered.
0 visualtest/docs/html/tab_s.png 100755 → 100644
Diff not rendered.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
0 visualtest/src/mischelper.c 100755 → 100644
Empty file.
0 visualtest/src/parsehelper.c 100755 → 100644
Empty file.
0 visualtest/src/rwhelper.c 100755 → 100644
Empty file.
0 visualtest/src/screenshot.c 100755 → 100644
Empty file.
0 visualtest/src/sut_configparser.c 100755 → 100644
Empty file.
0 visualtest/src/testharness.c 100755 → 100644
Empty file.
0 visualtest/src/variator_common.c 100755 → 100644
Empty file.
Empty file.
0 visualtest/src/variator_random.c 100755 → 100644
Empty file.
0 visualtest/src/variators.c 100755 → 100644
Empty file.
Empty file.
Empty file.
0 visualtest/unittest/testquit.c 100755 → 100644
Empty file.

0 comments on commit 2bb344d

Please sign in to comment.