Full Screen mouse cursor Ubuntu

Linux specific questions.
Post Reply
danielnice
Posts: 6
Joined: Apr 23, 2018 20:29

Full Screen mouse cursor Ubuntu

Post by danielnice »

Using FreeBASIC under Ubuntu 16.04 LTS (64 bit):
(1) Is there a way to disable (hide) the mouse cursor in a full-screen graphics FreeBASIC program?
(2) Is there a way to alter the mouse cursor?

I'm used to handling the mouse cursor myself via callback in DOS.
I am testing this with Ubuntu 16.04 LTS (64 bit).

Thank you for your help.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Full Screen mouse cursor Ubuntu

Post by St_W »

badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Full Screen mouse cursor Ubuntu

Post by badidea »

Setmouse , , 0
This works on my machine (Ubuntu Mate 16.04 64-bit, FBC 32 & 64 bit).

Code: Select all

#include "fbgfx.bi"

Type mouse
    As Integer res
    As Integer x, y, wheel, clip
    Union
        buttons As Integer
        Type
            Left:1 As Integer
            Right:1 As Integer
            middle:1 As Integer
        End Type
    End Union
End Type
 
Screenres 800, 600, 32, , FB.GFX_FULLSCREEN
Setmouse , , 0
Dim As mouse m
Do
    m.res = GetMouse( m.x, m.y, m.wheel, m.buttons, m.clip )
    ScreenLock
    'Cls
    Circle (m.x, m.y), 5, &h004488AA
    locate 1,1
    Print Using "res = #"; m.res
    Print Using "x = ###; y = ###; wheel = +###; clip = ##"; m.x; m.y; m.wheel; m.clip
    Print Using "buttons = ##; left = #; middle = #; right = #"; m.buttons; m.left; m.middle; m.right
    ScreenUnlock
    Sleep 11, 1
Loop While Inkey = ""
Post Reply