Function for setting first mode in desktop. (#4370)

git-svn-id: http://dev.geogebra.org/svn/trunk/geogebra@35571 23ce0884-8a58-47d3-bc5c-ddf1cd5b9f9e
Needless variable removed. (#4370)

git-svn-id: http://dev.geogebra.org/svn/trunk/geogebra@35572 23ce0884-8a58-47d3-bc5c-ddf1cd5b9f9e
#4393 some checks

git-svn-id: http://dev.geogebra.org/svn/trunk/geogebra@35573 23ce0884-8a58-47d3-bc5c-ddf1cd5b9f9e