comparison src/video/x11/SDL_x11modes.c @ 1690:43ba677b4f62 SDL-1.3

Fixed bug #241
author Sam Lantinga <slouken@libsdl.org>
date Tue, 20 Jun 2006 05:27:03 +0000
parents 4da1ee79c9af
children
comparison
equal deleted inserted replaced
1689:109bdfe06b31 1690:43ba677b4f62
735 int screen_h; 735 int screen_h;
736 736
737 screen_w = DisplayWidth(SDL_Display, SDL_Screen); 737 screen_w = DisplayWidth(SDL_Display, SDL_Screen);
738 screen_h = DisplayHeight(SDL_Display, SDL_Screen); 738 screen_h = DisplayHeight(SDL_Display, SDL_Screen);
739 739
740 #if SDL_VIDEO_DRIVER_X11_VIDMODE 740 #if SDL_VIDEO_DRIVER_X11_XINERAMA
741 if (use_xinerama && 741 if (use_xinerama &&
742 window_w <= xinerama[this->current_display].width && 742 window_w <= xinerama[this->current_display].width &&
743 window_h <= xinerama[this->current_display].height) { 743 window_h <= xinerama[this->current_display].height) {
744 x = xinerama[this->current_display].x_org; 744 x = xinerama[this->current_display].x_org;
745 y = xinerama[this->current_display].y_org; 745 y = xinerama[this->current_display].y_org;
746 } 746 }
747 #endif 747 #endif /* SDL_VIDEO_DRIVER_X11_XINERAMA */
748
748 if (currently_fullscreen) { 749 if (currently_fullscreen) {
749 /* Switch resolution and cover it with the FSwindow */ 750 /* Switch resolution and cover it with the FSwindow */
750 move_cursor_to(this, x, y); 751 move_cursor_to(this, x, y);
751 set_best_resolution(this, window_w, window_h); 752 set_best_resolution(this, window_w, window_h);
752 move_cursor_to(this, x, y); 753 move_cursor_to(this, x, y);
799 } 800 }
800 801
801 /* Ungrab the input so that we can move the mouse around */ 802 /* Ungrab the input so that we can move the mouse around */
802 X11_GrabInputNoLock(this, SDL_GRAB_OFF); 803 X11_GrabInputNoLock(this, SDL_GRAB_OFF);
803 804
804 #if SDL_VIDEO_DRIVER_X11_VIDMODE 805 #if SDL_VIDEO_DRIVER_X11_XINERAMA
805 if (use_xinerama && 806 if (use_xinerama &&
806 window_w <= xinerama[this->current_display].width && 807 window_w <= xinerama[this->current_display].width &&
807 window_h <= xinerama[this->current_display].height) { 808 window_h <= xinerama[this->current_display].height) {
808 x = xinerama[this->current_display].x_org; 809 x = xinerama[this->current_display].x_org;
809 y = xinerama[this->current_display].y_org; 810 y = xinerama[this->current_display].y_org;
810 } 811 }
811 #endif 812 #endif /* SDL_VIDEO_DRIVER_X11_XINERAMA */
813
812 /* Map the fullscreen window to blank the screen */ 814 /* Map the fullscreen window to blank the screen */
813 screen_w = DisplayWidth(SDL_Display, SDL_Screen); 815 screen_w = DisplayWidth(SDL_Display, SDL_Screen);
814 screen_h = DisplayHeight(SDL_Display, SDL_Screen); 816 screen_h = DisplayHeight(SDL_Display, SDL_Screen);
815 get_real_resolution(this, &real_w, &real_h); 817 get_real_resolution(this, &real_w, &real_h);
816 if (window_w > real_w) { 818 if (window_w > real_w) {