@@ -93,7 +93,9 @@ rfbBool vnc_reflect_send_cuttext(char *str, int len);
93
93
static void debug_colormap (XImage * fb );
94
94
static void set_visual (char * str );
95
95
static void nofb_hook (rfbClientPtr cl );
96
+ #if HAVE_SETDESKTOPSIZE
96
97
static int set_desktop_size_hook (int width , int height , int numScreens , rfbExtDesktopScreen * extDesktopScreens , rfbClientPtr cl );
98
+ #endif
97
99
static void remove_fake_fb (void );
98
100
static void install_fake_fb (int w , int h , int bpp );
99
101
static void initialize_snap_fb (void );
@@ -820,6 +822,7 @@ void free_old_fb(void) {
820
822
}
821
823
}
822
824
825
+ #if HAVE_SETDESKTOPSIZE
823
826
static int set_desktop_size_hook (int width , int height , int numScreens , rfbExtDesktopScreen * extDesktopScreens , rfbClientPtr cl )
824
827
{
825
828
int i ;
@@ -836,6 +839,7 @@ static int set_desktop_size_hook(int width, int height, int numScreens, rfbExtDe
836
839
837
840
return xrandr_set_scale_from (width , height ) ? rfbExtDesktopSize_Success : rfbExtDesktopSize_InvalidScreenLayout ;
838
841
}
842
+ #endif
839
843
840
844
static char _lcs_tmp [128 ];
841
845
static int _bytes0_size = 128 , _bytes0 [128 ];
@@ -3669,9 +3673,11 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
3669
3673
screen -> ptrAddEvent = pointer_event ;
3670
3674
screen -> setXCutText = xcut_receive ;
3671
3675
screen -> setTranslateFunction = set_xlate_wrapper ;
3676
+ #if HAVE_SETDESKTOPSIZE
3672
3677
if (enable_setdesktopsize ) {
3673
3678
screen -> setDesktopSizeHook = set_desktop_size_hook ;
3674
3679
}
3680
+ #endif
3675
3681
3676
3682
screen -> kbdReleaseAllKeys = kbd_release_all_keys ;
3677
3683
screen -> setSingleWindow = set_single_window ;
0 commit comments