Don't crash when no WM is present.

CR: Sam Lantinga.
This commit is contained in:
Sam Lantinga 2013-11-27 10:29:27 -08:00
parent 8574c0815c
commit 2bb344d6dc
84 changed files with 12 additions and 8 deletions

0
android-project/src/org/libsdl/app/SDLActivity.java Executable file → Normal file
View File

0
premake/Linux/SDL_config_premake.h Executable file → Normal file
View File

0
premake/MinGW/SDL_config_premake.h Executable file → Normal file
View File

0
premake/VisualC/VS2008/SDL_config_premake.h Executable file → Normal file
View File

0
premake/VisualC/VS2010/SDL_config_premake.h Executable file → Normal file
View File

0
premake/VisualC/VS2012/SDL_config_premake.h Executable file → Normal file
View File

0
premake/Xcode-iOS/SDL_config_premake.h Executable file → Normal file
View File

0
premake/Xcode/Xcode3/SDL_config_premake.h Executable file → Normal file
View File

0
premake/Xcode/Xcode4/SDL_config_premake.h Executable file → Normal file
View File

0
premake/config/SDL_config_cygwin.template.h Executable file → Normal file
View File

0
premake/config/SDL_config_iphoneos.template.h Executable file → Normal file
View File

0
premake/config/SDL_config_linux.template.h Executable file → Normal file
View File

0
premake/config/SDL_config_macosx.template.h Executable file → Normal file
View File

0
premake/config/SDL_config_minimal.template.h Executable file → Normal file
View File

0
premake/config/SDL_config_windows.template.h Executable file → Normal file
View File

0
src/video/SDL_video.c Executable file → Normal file
View File

0
src/video/windows/SDL_windowsevents.c Executable file → Normal file
View File

0
src/video/windows/SDL_windowswindow.c Executable file → Normal file
View File

0
src/video/windows/SDL_windowswindow.h Executable file → Normal file
View File

View 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,11 +453,14 @@ 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) {
@ -465,8 +468,9 @@ X11_CheckWindowManager(_THIS)
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 Executable file → Normal file
View File

0
visualtest/docs/html/bc_s.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 676 B

0
visualtest/docs/html/bdwn.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 147 B

0
visualtest/docs/html/closed.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

0
visualtest/docs/html/doxygen.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
visualtest/docs/html/ftv2blank.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 86 B

0
visualtest/docs/html/ftv2cl.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 453 B

0
visualtest/docs/html/ftv2doc.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 746 B

0
visualtest/docs/html/ftv2folderclosed.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 616 B

0
visualtest/docs/html/ftv2folderopen.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 597 B

After

Width:  |  Height:  |  Size: 597 B

0
visualtest/docs/html/ftv2lastnode.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 86 B

0
visualtest/docs/html/ftv2link.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 746 B

0
visualtest/docs/html/ftv2mlastnode.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

0
visualtest/docs/html/ftv2mnode.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

0
visualtest/docs/html/ftv2mo.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 403 B

After

Width:  |  Height:  |  Size: 403 B

0
visualtest/docs/html/ftv2node.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 86 B

0
visualtest/docs/html/ftv2ns.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 388 B

0
visualtest/docs/html/ftv2plastnode.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 229 B

0
visualtest/docs/html/ftv2pnode.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 229 B

0
visualtest/docs/html/ftv2splitbar.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 314 B

0
visualtest/docs/html/ftv2vertline.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 86 B

0
visualtest/docs/html/nav_f.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 153 B

After

Width:  |  Height:  |  Size: 153 B

0
visualtest/docs/html/nav_g.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 95 B

After

Width:  |  Height:  |  Size: 95 B

0
visualtest/docs/html/nav_h.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 98 B

After

Width:  |  Height:  |  Size: 98 B

0
visualtest/docs/html/open.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 123 B

0
visualtest/docs/html/search/close.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 273 B

0
visualtest/docs/html/search/mag_sel.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 563 B

After

Width:  |  Height:  |  Size: 563 B

0
visualtest/docs/html/search/search_l.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 604 B

After

Width:  |  Height:  |  Size: 604 B

0
visualtest/docs/html/search/search_m.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

0
visualtest/docs/html/search/search_r.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 612 B

0
visualtest/docs/html/sync_off.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 853 B

After

Width:  |  Height:  |  Size: 853 B

0
visualtest/docs/html/sync_on.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 845 B

After

Width:  |  Height:  |  Size: 845 B

0
visualtest/docs/html/tab_a.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

0
visualtest/docs/html/tab_b.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 169 B

0
visualtest/docs/html/tab_h.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 177 B

0
visualtest/docs/html/tab_s.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

View File

View File

0
visualtest/include/SDL_visualtest_harness_argparser.h Executable file → Normal file
View File

0
visualtest/include/SDL_visualtest_mischelper.h Executable file → Normal file
View File

0
visualtest/include/SDL_visualtest_parsehelper.h Executable file → Normal file
View File

0
visualtest/include/SDL_visualtest_process.h Executable file → Normal file
View File

0
visualtest/include/SDL_visualtest_random_variator.h Executable file → Normal file
View File

0
visualtest/include/SDL_visualtest_rwhelper.h Executable file → Normal file
View File

0
visualtest/include/SDL_visualtest_screenshot.h Executable file → Normal file
View File

0
visualtest/include/SDL_visualtest_sut_configparser.h Executable file → Normal file
View File

0
visualtest/include/SDL_visualtest_variator_common.h Executable file → Normal file
View File

0
visualtest/include/SDL_visualtest_variators.h Executable file → Normal file
View File

0
visualtest/src/action_configparser.c Executable file → Normal file
View File

0
visualtest/src/harness_argparser.c Executable file → Normal file
View File

0
visualtest/src/linux/linux_process.c Executable file → Normal file
View File

0
visualtest/src/mischelper.c Executable file → Normal file
View File

0
visualtest/src/parsehelper.c Executable file → Normal file
View File

0
visualtest/src/rwhelper.c Executable file → Normal file
View File

0
visualtest/src/screenshot.c Executable file → Normal file
View File

0
visualtest/src/sut_configparser.c Executable file → Normal file
View File

0
visualtest/src/testharness.c Executable file → Normal file
View File

0
visualtest/src/variator_common.c Executable file → Normal file
View File

0
visualtest/src/variator_exhaustive.c Executable file → Normal file
View File

0
visualtest/src/variator_random.c Executable file → Normal file
View File

0
visualtest/src/variators.c Executable file → Normal file
View File

0
visualtest/src/windows/windows_process.c Executable file → Normal file
View File

0
visualtest/src/windows/windows_screenshot.c Executable file → Normal file
View File

0
visualtest/unittest/testquit.c Executable file → Normal file
View File