BUG: Window scrollbar makes list browsing behaving wrong

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

BUG: Window scrollbar makes list browsing behaving wrong

Post by Raziel »

When i scroll an entry list in a window and the vertical scrollbar kicks in, i lose focus on the file names.

1) Open any directory with many files inside in a window (there must be at least as many as to make the right/vertical scrollbar appear).
2) PD-Menu Window/View by/Name
3) Make sure that you have at least one filename with a very long name in your drawer, one that goes over the right border of the window and makes the bottom scrollbar available. It should also be long enough to make a good part of the filename cut from the normal window size, or just reduce your window measurements.
4) Click on the first file name and either press cursor down or use the mouse wheel to scroll down.
5) Everything is fine, the file names get activated and i'm happy
5) Once you come to the end of the window and the vertical scrollbar kicks in, the following happens (either with mouse wheel or cursor)

When the cursor goes to the next line the whole entry list is moved to the right (to where the longest filename ends (but you can't see that because the filename might come a lot later) and it skips back to the left (the beginning of all other filenames) on the next line that is displayed and so on.

I don't really know what the idea behind such behaviour is, but it makes scrolling the list without the scroll bar pretty much unusable.
I also see two problems.
1) The very long filename might come a lot later in the list which makes the display from a user pov look just buggy
2) The fact that the list is moved to the right makes all shorter filenames pretty much vanish or at least very hard to see)

I'm considering this as a bug, probably because of the scrollbar drawing interferes with the list display(?)
Maybe not the vertical but the horizontal scrollbar?
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: BUG: Window scrollbar makes list browsing behaving wrong

Post by tonyw »

I can confirm that the display pans back and forth on alternate lines of text, and I fully agree with your description.

Well done for describing it so well. I will raise a BZ on the subject.

BZ #10036 raised.
cheers
tony
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: BUG: Window scrollbar makes list browsing behaving wrong

Post by Raziel »

:-)

Thank you for picking them up to radpidly
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: BUG: Window scrollbar makes list browsing behaving wrong

Post by Raziel »

@colinw

I have a question regarding this problem.
Is the scrollbar handling the same for windows with icons (drawers) as for windows with text (apps).

Because i can recreate the same (nearly, or at least very familiar) behaviour with Notepad, Multiview, MultiEdit and Multiviewer which leads me to believe it might be a system wide problem.

If those two windows (scrollers) aren't related i'll gladly share the details in a new report, otherwise i'll add them here.
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: BUG: Window scrollbar makes list browsing behaving wrong

Post by tonyw »

The original problem you described has been found to be caused by workbench.library and has been fixed, although we are still testing it and finishing off the details.

Please describe how to reproduce the other problems and we'll check to see if they are influenced by the workbench.lib fix.
cheers
tony
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: BUG: Window scrollbar makes list browsing behaving wrong

Post by Raziel »

tonyw wrote:The original problem you described has been found to be caused by workbench.library and has been fixed, although we are still testing it and finishing off the details.
Wow, that was fast :-)
Great work and thank you for the feedback
Please describe how to reproduce the other problems and we'll check to see if they are influenced by the workbench.lib fix.
Here we go, this is a report consisting of two (maybe even three) slightly differing, but very similar problems in two different programs.

Affected programs:
Notepad 53.16 (19.5.2016)
MultiView 53.8 (17.1.2014)
datatypes.library 54.6 (8.1.2016)

Steps to reproduce the NotePad problem:

1) Open NotePad
2) Load in (c&p) the file
Be sure to reduce the window width to make the horizontal scrollbar (bottom) appear (while it should come up automatically, because there is a pretty long line in the text, but just in case)
3) Click on or bring up "Find"
4) Type "SDL_CONFIG" and let it search
5) Click on "Find next" three more times
The first four searches are fine, because they all lie within the boundaries of NotePad's window
6) Click on "Find Next" once more
Now the horizontal scrollbar will scroll to the left to display the find, all is (still) well
7) Now click on "Find previous"
This is where the behaviour occurs the first time.
The scrollbar, while it is scrolling back to the left, will not hit the left (scrollbar) boundary but will stay in a position just a bit to the right and outside the area to actually display the search term.
One would have to manually adjust the scrollbar to make the find visible.

But we don't do that right now, instead
8) Click on "Find Next" again three times
Now it will have found the next entry after that long line and it will again not be visible due to the scrollbar not reaching the beginning of the text.

That's it for NotePad

Steps to reproduce the Multiview problem:

1) Open Multiview
2) Load in the file
Be sure to reduce the window width to make the horizontal scrollbar (bottom) appear (while it should come up automatically, because there is a pretty long line in the text, but just in case)
3) Press "RETURN" to bring up the search window
4) Search for "SDL_CONFIG"
The first four are good, but the fifth search will again (see NotePad) land in oblivion and nowhere to be seen.
Because in Multiview's case the horizontal scrollbar (bottom) refuses to even move to the right, it stays glued to the left scrollbar boundary.
The search term has been found (which can be verified by manually moving the scrollbar and finding the marked term) but no indicator tells me that.
5) Now "do a "Find Next" two more times and it "should" hit the last entry in the text, well, it "should".
It probably even does so, but again, no indicator (no marked found search term) is visible
While this seems to be another visual bug, it's related to the scrollbar problems, so i put it as third bug in here.


Data to test with (excerp from a configure file, nt the whole as the forum software prevents posts with more than 60.000 characters, but it's sufficent to display the behaviour):

Code: Select all

#!/bin/sh
#
# configure -- custom configure script for ScummVM.
#
# ScummVM is the legal property of its developers, whose names
# are too numerous to list here. Please refer to the COPYRIGHT
# file distributed with this source distribution.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#

# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# Save the current environment variables for next runs
SAVED_CONFIGFLAGS=$@
SAVED_AR=$AR
SAVED_AS=$AS
SAVED_ASFLAGS=$ASFLAGS
SAVED_CPPFLAGS=$CPPFLAGS
SAVED_CXX=$CXX
SAVED_CXXFLAGS=$CXXFLAGS
SAVED_DWP=$DWP
SAVED_LD=$LD
SAVED_LDFLAGS=$LDFLAGS
SAVED_PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-unset}
SAVED_RANLIB=$RANLIB
SAVED_SDL_CONFIG=$SDL_CONFIG
SAVED_STRIP=$STRIP
SAVED_WINDRES=$WINDRES
SAVED_WINDRESFLAGS=$WINDRESFLAGS

# Use environment vars if set
CXXFLAGS="$CXXFLAGS $CPPFLAGS"

# Backslashes into forward slashes:
# The following OS/2 specific code is performed to deal with handling of backslashes by ksh.
# Borrowed from the Sane configure script

if test "$ac_emxsupport" != "no" -a "$ac_emxsupport" != "NO"; then
   ac_save_IFS="$IFS"
   IFS="\\"
   ac_TEMP_PATH=
   for ac_dir in $PATH; do
      IFS=$ac_save_IFS
      if test -z "$ac_TEMP_PATH"; then
         ac_TEMP_PATH="$ac_dir"
      else
         ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir"
      fi
   done
   PATH="$ac_TEMP_PATH"
   export PATH
   unset ac_TEMP_PATH
fi

set_var() {
   eval ${1}='${2}'
}

get_var() {
   eval echo \$${1}
}

append_var() {
   VAR=${1}
   shift
   if eval test -z \"\$${VAR}\" ; then
      eval ${VAR}='$@'
   else
      eval ${VAR}=\"\$${VAR} \"'$@'
   fi
}

prepend_var() {
   VAR=${1}
   shift
   if eval test -z \"\$${VAR}\" ; then
      eval ${VAR}='$@'
   else
      eval ${VAR}='$@'\" \$${VAR}\"
   fi
}

# Add an engine: id name build subengines base-games dependencies
add_engine() {
   _engines="${_engines} ${1}"
   if test "${3}" = "no" ; then
      set_var _wip_engines "${_wip_engines} ${1}"
   fi
   set_var _engine_${1}_name "${2}"
   set_var _engine_${1}_build "${3}"
   set_var _engine_${1}_build_default "${3}"
   set_var _engine_${1}_subengines "${4}"
   set_var _engine_${1}_base "${5}"
   set_var _engine_${1}_deps "${6}"
   for sub in ${4}; do
      set_var _engine_${sub}_sub "yes"
      set_var _engine_${sub}_parent "${1}"
   done
}

# Add a feature: id name settings-list
add_feature() {
   set_var _feature_${1}_name "${2}"
   # This is a list of settings, where one must be "yes" for the feature to
   # be enabled
   set_var _feature_${1}_settings "${3}"
}

_srcdir=`dirname $0`

# Read list of engines
for i in $_srcdir/engines/*/configure.engine; do
   . "$i"
done

#
# Default settings
#
# Default lib behavior yes/no/auto
_ogg=auto
_vorbis=auto
_sdlnet=auto
_libcurl=auto
_tremor=auto
_tremolo=no
_flac=auto
_mad=auto
_opl2lpt=no
_alsa=auto
_seq_midi=auto
_sndio=auto
_timidity=auto
_zlib=auto
_mpeg2=auto
_a52=auto
_sparkle=auto
_osxdockplugin=auto
_jpeg=auto
_png=auto
_theoradec=auto
_faad=auto
_fluidsynth=auto
_opengl_mode=auto
_readline=auto
_freetype2=auto
_taskbar=auto
_updates=no
_libunity=auto
# Default option behavior yes/no
_debug_build=auto
_release_build=auto
_optimizations=auto
_use_cxx11=no
_verbose_build=no
_text_console=no
_mt32emu=yes
_build_scalers=yes
_build_hq_scalers=yes
_enable_prof=no
_global_constructors=no
_no_undefined_var_template=no
_no_pragma_pack=no
_bink=yes
_cloud=auto
# Default vkeybd/keymapper/eventrec options
_vkeybd=no
_keymapper=no
_eventrec=auto
# GUI translation options
_translation=yes
# Default platform settings
_backend=sdl
_16bit=auto
_highres=auto
_savegame_timestamp=auto
_dynamic_modules=no
_elf_loader=no
_plugins_default=static
_plugin_prefix=
_plugin_suffix=
_nasm=auto
_optimization_level=
_default_optimization_level=-O2
_nuked_opl=yes
# Default commands
_ranlib=ranlib
_strip=strip
_ar="ar cru"
_as="as"
_dwp=dwp
_windres=windres
_stagingpath="staging"
_win32path="c:/scummvm"
_amigaospath="Games:ScummVM"
_staticlibpath=
_xcodetoolspath=
_sparklepath=
_sdlconfig=sdl2-config
_libcurlconfig=curl-config
_freetypeconfig=freetype-config
_freetype_found="false"
_sdlpath="$PATH"
_freetypepath="$PATH"
_libcurlpath="$PATH"
_nasmpath="$PATH"
NASMFLAGS=""
NASM=""
_tainted_build=no
# The following variables are automatically detected, and should not
# be modified otherwise. Consider them read-only.
_posix=no
_has_posix_spawn=no
_endian=unknown
_need_memalign=yes
_have_x86=no

# Add (virtual) features
add_feature 16bit "16bit color" "_16bit"
add_feature bink "Bink" "_bink"
add_feature cloud "cloud" "_cloud"
add_feature faad "libfaad" "_faad"
add_feature flac "FLAC" "_flac"
add_feature freetype2 "FreeType2" "_freetype2"
add_feature highres "high resolution" "_highres"
add_feature mad "MAD" "_mad"
add_feature jpeg "JPEG" "_jpeg"
add_feature png "PNG" "_png"
add_feature theoradec "libtheoradec" "_theoradec"
add_feature vorbis "Vorbis file support" "_vorbis _tremor"
add_feature zlib "zlib" "_zlib"



# Directories for installing ScummVM.
# This list is closely based on what GNU autoconf does,
# although the default value for datadir differs.
# Like GNU autoconf, we distinguish datadir and datarootdir
# to make it possible to change e.g. the location of the
# man pages independently of that of the engine data files,
# which are placed inside $datadir/scummvm
prefix=NONE
exec_prefix=NONE
bindir='${exec_prefix}/bin'
libdir='${exec_prefix}/lib'
datarootdir='${prefix}/share'
datadir='${datarootdir}/scummvm'
mandir='${datarootdir}/man'
docdir='${datarootdir}/doc/scummvm'
#localedir='${datarootdir}/locale'

# For cross compiling
_host=""
_host_cpu=""
_host_vendor=""
_host_os=""
_host_alias=""

_port_mk="ports.mk"

# Use temp files in the build directory
TMPO=./scummvm-conf
TMPC=${TMPO}.cpp
TMPLOG=config.log

cc_check_no_clean() {
   echo >> "$TMPLOG"
   cat "$TMPC" >> "$TMPLOG"
   echo >> "$TMPLOG"
   echo "$CXX $LDFLAGS $CXXFLAGS $TMPC -o $TMPO$HOSTEXEEXT $@" >> "$TMPLOG"
   rm -f "$TMPO$HOSTEXEEXT"
   if test "-c" = "$*" ; then
      ( $CXX $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1
   else
      ( $CXX $LDFLAGS $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1
   fi
   TMPR="$?"
   echo "return code: $TMPR" >> "$TMPLOG"
   echo >> "$TMPLOG"
   return "$TMPR"
}

cc_check_clean() {
   rm -rf $TMPC $TMPO $TMPO.o $TMPO.dwo $TMPO.dSYM $TMPO$HOSTEXEEXT "$@"
}

cc_check() {
   cc_check_no_clean "$@"
   TMPR="$?"
   cc_check_clean
   return "$TMPR"
}

cc_check_define() {
cat > $TMPC << EOF
int main(void) {
   #ifndef $1
   syntax error
   #endif
   return 0;
}
EOF
   cc_check -c
   return $?
}

gcc_get_define() {
   echo "" | $CXX -dM -E - | fgrep "$1" | head -n1 | cut -d ' ' -f 3-
}

#
# Function to provide echo -n for bourne shells that don't have it
#
echo_n() {
   printf "$@"
}

echocheck() {
   echo_n "Checking for $@... "
}

# Add a line of data to config.mk.
add_line_to_config_mk() {
   _config_mk_data="$_config_mk_data"'
'"$1"
}

# Add a line of data to config.h.
add_line_to_config_h() {
   _config_h_data="$_config_h_data"'
'"$1"
}

# Conditionally add a line of data to config.h. Takes two parameters:
# The first one can be set to 'no' to "comment out" the line, i.e.
# make it ineffective, use 'yes' otherwise.
# The second param is the line to insert.
add_to_config_h_if_yes() {
   if test "$1" = yes ; then
      add_line_to_config_h "$2"
   else
      add_line_to_config_h "/* $2 */"
   fi
}

# Conditionally add a line of data to config.mk. Takes two parameters:
# The first one can be set to 'no' to "comment out" the line, i.e.
# make it ineffective, use 'yes' otherwise.
# The second param is the line to insert.
add_to_config_mk_if_yes() {
   if test "$1" = yes ; then
      add_line_to_config_mk "$2"
   else
      add_line_to_config_mk "# $2"
   fi
}

# Conditionally add a '#define' line to config.h. Takes two parameters:
# The first one can be set to 'yes' or 'no'. If 'yes' is used, then
# the line "#define $2" is added to config.h, otherwise "#undef $2".
define_in_config_h_if_yes() {
   if test "$1" = yes ; then
      add_line_to_config_h "#define $2"
   else
      add_line_to_config_h "#undef $2"
   fi
}

# Conditionally add definitions to config.h and config.mk. Takes two parameters:
# The first one can be set to 'yes' or 'no'. If 'yes' is used, then
# the line "#define $2" is added to config.h and "$2 = 1" to config.mk.
# Otherwise "#undef $2" is added to config.h and "# $2 = 1" to config.mk
define_in_config_if_yes() {
   if test "$1" = yes ; then
      add_line_to_config_h "#define $2"
      add_line_to_config_mk "$2 = 1"
   else
      add_line_to_config_h "#undef $2"
      add_line_to_config_mk "# $2 = 1"
   fi
}

define_in_config_if_no() {
   if test "$1" = no ; then
      add_line_to_config_h "#define $2"
      add_line_to_config_mk "$2 = 1"
   else
      add_line_to_config_h "#undef $2"
      add_line_to_config_mk "# $2 = 1"
   fi
}

#
# Determine sdl-config
#
# TODO: small bit of code to test sdl usability
find_sdlconfig() {
   echo_n "Looking for sdl-config... "
   sdlconfigs="$SDL_CONFIG:$_sdlconfig:sdl2-config:sdl12-config:sdl11-config:sdl-config"
   _sdlconfig=

   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
   for path_dir in $_sdlpath; do
      #reset separator to parse sdlconfigs
      IFS=":"
      for sdlconfig in $sdlconfigs; do
         if test -f "$path_dir/$sdlconfig" ; then
            _sdlconfig="$path_dir/$sdlconfig"
            echo $_sdlconfig
            # Save the prefix
            _sdlpath=$path_dir
            if test `basename $path_dir` = bin ; then
               _sdlpath=`dirname $path_dir`
            fi
            # break at first sdl-config found in path
            break 2
         fi
      done
   done

   IFS="$ac_save_ifs"

   if test -z "$_sdlconfig"; then
      echo "none found!"
      exit 1
   fi
}

#
# Determine freetype-config
#
find_freetypeconfig() {
   echo_n "Looking for freetype-config... "
   freetypeconfigs="$_freetypeconfig"
   _freetypeconfig=

   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
   for path_dir in $_freetypepath; do
      #reset separator to parse freetypeconfigs
      IFS=":"
      for freetypeconfig in $freetypeconfigs; do
         if test -f "$path_dir/$freetypeconfig" ; then
            _freetypeconfig="$path_dir/$freetypeconfig"
            echo $_freetypeconfig
            # Save the prefix
            _freetypepath=$path_dir
            if test `basename $path_dir` = bin ; then
               _freetypepath=`dirname $path_dir`
            fi
            # break at first freetype-config found in path
            break 2
         fi
      done
   done

   IFS="$ac_save_ifs"

   if test -z "$_freetypeconfig"; then
      echo "none found!"
   fi
}

#
# Determine curl-config
#
find_libcurlconfig() {
   echo_n "Looking for curl-config... "
   libcurlconfigs="$_libcurlconfig"
   _libcurlconfig=

   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
   for path_dir in $_libcurlpath; do
      #reset separator to parse sdlconfigs
      IFS=":"
      for libcurlconfig in $libcurlconfigs; do
         if test -f "$path_dir/$libcurlconfig" ; then
            _libcurlconfig="$path_dir/$libcurlconfig"
            echo $_libcurlconfig
            # Save the prefix
            _libcurlpath=$path_dir
            if test `basename $path_dir` = bin ; then
               _libcurlpath=`dirname $path_dir`
            fi
            # break at first curl-config found in path
            break 2
         fi
      done
   done

   IFS="$ac_save_ifs"

   if test -z "$_libcurlconfig"; then
      echo "none found!"
   fi
}

#
# Determine extension used for executables
#
get_system_exe_extension() {
   case $1 in
   riscos)
      _exeext=",e1f"
      ;;
   3ds | dreamcast | ds | gamecube | n64 | ps2 | psp | wii)
      _exeext=".elf"
      ;;
   gph-linux)
      _exeext=".gph"
      ;;
   mingw* | *os2-emx | wince)
      _exeext=".exe"
      ;;
   *)
      _exeext=""
      ;;
   esac
}

#
# Generic options functions
#

# Show the configure help line for an option
option_help() {
   if test "${3}" != "" ; then
      tmpopt_prefix="${3}"
   else
      tmpopt_prefix="--"
   fi
   tmpopt=`echo $1 | sed 's/_/-/g'`
   option=`echo "${tmpopt_prefix}${tmpopt}                       " | sed "s/\(.\{23\}\).*/\1/"`
   echo "  ${option}  ${2}"
}

# Show an error about an unknown option
option_error() {
   echo "error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
   exit 1
}

# Show an error about an unknown engine
engine_option_error() {
   echo "error: unrecognized engine: $1
Try \`$0 --help' for more information." >&2
   exit 1
}

# Show an error about an invalid subengine option
subengine_option_error() {
   echo "error: this option is invalid for the subengine $1: $ac_option
Try \`$0 --help' for more information." >&2
   exit 1
}


#
# Feature handling functions
#

# Get the name of the feature
get_feature_name() {
   get_var _feature_$1_name
}

# Check whether the feature is enabled
get_feature_state() {
   for i in `get_var _feature_$1_settings`; do
      if test `get_var $i` = "yes"; then
         echo "yes"
         return
      fi
   done
   echo "no"
}


#
# Engine handling functions
#

# Get the name of the engine
get_engine_name() {
   get_var _engine_$1_name
}

# Will this engine be built?
get_engine_build() {
   get_var _engine_$1_build
}

# Was this engine set to be built by default?
get_engine_build_default() {
   get_var _engine_$1_build_default
}

# Get the subengines
get_engine_subengines() {
   get_var _engine_$1_subengines
}

# Get the dependencies
get_engine_dependencies() {
   get_var _engine_$1_deps
}

# Get the base engine game support description
get_engine_base() {
   get_var _engine_$1_base
}

# Ask if this is a subengine
get_engine_sub() {
   sub=`get_var _engine_$1_sub`
   if test -z "$sub" ; then
      sub=no
   fi
   echo $sub
}

# Get a subengine's parent (undefined for non-subengines)
get_subengine_parent() {
   get_var _engine_$1_parent
}

# Enable *all* engines
engine_enable_all() {
   for engine in $_engines; do
      set_var _engine_${engine}_build "yes"
   done
}

# Disable *all* engines
engine_disable_all() {
   for engine in $_engines; do
      set_var _engine_${engine}_build "no"
   done
}

# Enable the given engine
engine_enable() {
   # Get the parameter
   if ( echo $1 | grep ':' ) 2> /dev/null > /dev/null ; then
      eng=`echo $1 | cut -d ':' -f 1`
      opt=`echo $1 | cut -d ':' -f 2`
   else
      eng=$1
      opt=yes
   fi
   engine=`echo $eng | sed 's/-/_/g'`

   # Filter the parameter for the subengines
   if test "`get_engine_sub ${engine}`" != "no" ; then
      if test "$opt" != "yes" ; then
         subengine_option_error ${engine}
         return
      fi
      parent=`get_subengine_parent ${engine}`
      if test `get_engine_build ${parent}` = "no" ; then
         set_var _engine_${parent}_build "yes"
      fi
   fi

   if test "$opt" = "static" -o "$opt" = "dynamic" -o "$opt" = "yes" ; then
      if test "`get_engine_name ${engine}`" != "" ; then
         set_var _engine_${engine}_build "$opt"
      else
         engine_option_error ${engine}
      fi
   else
      option_error
   fi
}

# Disable the given engine
engine_disable() {
   # Filter malformed options
   if ( echo $1 | grep '=' ) 2> /dev/null > /dev/null ; then
      option_error
      return
   fi

   engine=`echo $1 | sed 's/-/_/g'`
   if test "`get_engine_name ${engine}`" != "" ; then
      set_var _engine_${engine}_build "no"
   else
      engine_option_error ${engine}
   fi
}

# Check whether the engine's dependencies are met
# If that is not the case disable the engine
check_engine_deps() {
   unmet_deps=""

   # Check whether the engine is enabled
   if test `get_engine_build $1` != "no" ; then
      # Collect unmet dependencies
      for dep in `get_engine_dependencies $1`; do
         if test `get_feature_state $dep` = "no"; then
            feature_name=`get_feature_name $dep`
            unmet_deps="${unmet_deps}${feature_name} "
         fi
      done

      # Check whether there is any unmet dependency
      if test -n "$unmet_deps"; then
         echo "WARNING: Disabling engine "`get_engine_name $1`" because the following dependencies are unmet: "$unmet_deps
         engine_disable $1
      fi
   fi
}

# Show the configure help line for a given engine
show_engine_help() {
   name=`get_engine_name $1`
   option_help "${1}" "${name} engine" "  "
   for sub in `get_engine_subengines $1`; do
      show_subengine_help $sub $1
   done
}

# Show the configure help line for a given subengine
show_subengine_help() {
   name=`get_engine_name $1`
   parent=`get_engine_name $2`
   option_help "${1}" "${name} in ${parent} engine" "  "
}

# Prepare the strings about the engines to build
prepare_engine_build_strings() {
   string=`get_engine_build_string $1 static`
   if test -n "$string" ; then
      _engines_built_static="${_engines_built_static}#$string@"
   fi

   string=`get_engine_build_string $1 dynamic`
   if test -n "$string" ; then
      _engines_built_dynamic="${_engines_built_dynamic}#$string@"
   fi

   string=`get_engine_build_string $1 no`
   if test -n "$string" ; then
      _engines_skipped="${_engines_skipped}#$string@"
   fi

   string=`get_engine_build_string $1 wip`
   if test -n "$string" ; then
      _engines_built_wip="${_engines_built_wip}#$string@"
   fi

}

# Get the string about building an engine
get_engine_build_string() {
   engine=$1
   request_status=$2
   engine_string=""
   engine_build=`get_engine_build $1`
   engine_build_default=`get_engine_build_default $engine`
   show=no

   # Convert static/dynamic to yes to ease the check of subengines
   if test $engine_build = no; then
      subengine_filter=no
   else
      subengine_filter=yes
   fi

   # Check if the current engine should be shown for the current status
   if test $engine_build = $request_status ; then
      show=yes
   else
      # Test for disabled sub-engines
      if test $request_status = no ; then
         for subeng in `get_engine_subengines $engine` ; do
            if test `get_engine_build $subeng` = no ; then
               # In this case we to display _disabled_ subengines
               subengine_filter=no
               show=yes
            fi
         done
      fi
      # Test for enabled wip sub-engines
      if test $request_status = wip ; then
         for subeng in `get_engine_subengines $engine` ; do
            if test `get_engine_build $subeng` != no -a `get_engine_build_default $subeng` = no ; then
               show=yes
            fi
         done
      fi
   fi


   # Check if it is a wip engine
   if test "$request_status" = "wip" -a "$engine_build" != "no" -a  "$engine_build_default" = no; then
      show=yes
   fi

   # The engine should be shown, build the string
   if test $show = yes ; then
      engine_string=`get_subengines_build_string $engine $subengine_filter $request_status`
      engine_string="`get_engine_name $engine` $engine_string"
   fi

   echo "$engine_string"
}

# Get the string about building subengines
get_subengines_build_string() {
   parent_engine=$1
   subengine_filter=$2
   request_status=$3
   parent_engine_build_default=`get_engine_build_default $parent_engine`
   subengine_string=""

   # If the base engine isn't built at all, no need to list subengines
   # in any of the possible categories.
   if test `get_engine_build $parent_engine` = no; then
      return
   fi

   all=yes
   # If there are no subengines, never display "[all games]" (for brevity).
   if test -z "`get_engine_subengines $parent_engine`"; then
      all=no
   fi
   # If the base engine does not fit the category we're displaying here
   # (WIP or Skipped), we should never show "[all games]"
   if test "$request_status" = wip; then
      if test $parent_engine_build_default = yes; then
         all=no
      fi
   fi
   if test "$request_status" = no; then
      # If we're here, the parent engine is built, so no need to check that.
      all=no
   fi


   # In the static/dynamic categories, also display the engine's base games.
   if test -n "`get_engine_subengines $parent_engine`" -a $request_status != no -a $request_status != wip; then
      subengine_string="[`get_engine_base $parent_engine`]"
   fi

   for subeng in `get_engine_subengines $parent_engine` ; do
      subengine_build=`get_engine_build $subeng`
      subengine_build_default=`get_engine_build_default $subeng`

      # Display this subengine if it matches the filter, unless it is
      # a stable subengine in the WIP request.
      if test $subengine_build = $subengine_filter -a \! \( "$request_status" = wip -a "$subengine_build_default" = yes \) ; then
         s="[`get_engine_name $subeng`]"
         if test -n "$subengine_string"; then
            subengine_string="$subengine_string $s"
         else
            subengine_string="$s"
         fi
      else
         all=no
      fi
   done

   # Summarize the full list, where applicable
   if test $all = yes ; then
      subengine_string="[all games]"
   fi

   echo "$subengine_string"
}

#
# Check any parameters we received
#
# TODO:
# * Change --disable-mad / --enable-mad to the way it's done in autoconf:
#  That is, --without-mad / --with-mad=/prefix/to/mad. Useful for people
#  who have Mad/Vorbis/ALSA installed in a non-standard locations.
#

for parm in "$@" ; do
   if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then
      for engine in $_engines; do
         if test `get_engine_sub $engine` = no ; then
            engines_help="$engines_help`show_engine_help $engine`
"
         fi
      done
      cat << EOF

Usage: $0 [OPTIONS]...

Configuration:
  -h, --help              display this help and exit
  --backend=BACKEND       backend to build (3ds, android, dc, dingux, ds, gcw0,
                          gph, iphone, ios7, linuxmoto, maemo, n64, null, openpandora,
                          ps2, psp, psp2, samsungtv, sdl, tizen, webos, wii, wince) [sdl]

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, \`make install' will install all the files in
\`/usr/local/bin', \`/usr/local/lib' etc.  You can specify
an installation prefix other than \`/usr/local' using \`--prefix',
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data
                          [DATAROOTDIR/scummvm]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/scummvm]

Special configuration feature:
  --host=HOST             cross-compile to target HOST (arm-linux, ...)
                          special targets: 3ds for Nintendo 3DS
                                           android-arm for Android ARM
                                           android-mips for Android MIPS
                                           android-x86 for Android x86
                                           androidsdl for Android with SDL backend
                                           caanoo for Caanoo
                                           dingux for Dingux
                                           raspberrypi for Raspberry Pi
                                           dreamcast for Sega Dreamcast
                                           ds for Nintendo DS
                                           gamecube for Nintendo GameCube
                                           gcw0 for GCW Zero
                                           gp2x for GP2X
                                           gp2xwiz for GP2X Wiz
                                           iphone for Apple iPhone (iOS <= 6)
                                           ios7 for Apple iPhone / iPad (iOS >= 7)
                                           maemo for Nokia Maemo
                                           motoezx for MotoEZX
                                           motomagx for MotoMAGX
                                           n64 for Nintendo 64
                                           openpandora for OpenPandora
                                           ouya for OUYA
                                           ps2 for PlayStation 2
                                           ps3 for PlayStation 3
                                           psp2 for PlayStation Vita
                                           psp for PlayStation Portable
                                           samsungtv for Samsung TV
                                           tizen for Samsung Tizen
                                           webos for HP Palm WebOS
                                           wii for Nintendo Wii
                                           wince for Windows CE

Game engines:
  --enable-all-engines     enable all engines, including those which are
                           broken or unsupported
  --disable-all-engines    disable all engines
  --enable-engine=<engine name>[,<engine name>...] enable engine(s) listed
  --disable-engine=<engine name>[,<engine name>...] disable engine(s) listed
  --enable-engine-static=<engine name>[,<engine name>...]
      enable engine(s) listed as static builtin (when plugins are enabled)
  --enable-engine-dynamic=<engine name>[,<engine name>...]
      enable engine(s) listed as dynamic plugin (when plugins are enabled)
    The values of <engine name> for these options are as follows:
$engines_help
Optional Features:
  --enable-static          build a static binary instead of using shared objects
  --enable-c++11           build as C++11 if the compiler allows that
  --disable-debug          disable building with debugging symbols
  --enable-Werror          treat warnings as errors
  --enable-release         enable building in release mode (this activates
                           optimizations)
  --enable-release-mode    enable building in release mode (without optimizations)
  --enable-optimizations   enable optimizations
  --enable-profiling       enable profiling
  --enable-plugins         enable the support for dynamic plugins
  --default-dynamic        make plugins dynamic by default
  --disable-mt32emu        don't enable the integrated MT-32 emulator
  --disable-nuked-opl      don't build Nuked OPL driver
  --disable-16bit          don't enable 16bit color support
  --disable-highres        don't enable support for high resolution engines >320x240
  --disable-savegame-timestamp don't use timestamps for blank savegame descriptions
  --disable-scalers        exclude scalers
  --disable-hq-scalers     exclude HQ2x and HQ3x scalers
  --disable-translation    don't build support for translated messages
  --disable-taskbar        don't build support for taskbar and launcher integration
  --disable-cloud          don't build cloud support
  --enable-vkeybd          build virtual keyboard support
  --enable-keymapper       build key mapper support
  --enable-eventrecorder   enable event recording functionality
  --disable-eventrecorder  disable event recording functionality
  --enable-updates         build support for updates
  --enable-text-console    use text console instead of graphical console
  --enable-verbose-build   enable regular echoing of commands during build
                           process
  --disable-bink           don't build with Bink video support
  --opengl-mode=MODE       OpenGL (ES) mode to use for OpenGL output [auto]
                           available modes: auto for autodetection
                                            none for disabling any OpenGL usage
                                            any for runtime detection
                                            gl for forcing OpenGL
                                            gles for forcing OpenGL ES
                                            gles2 for forcing OpenGL ES 2
                           WARNING: only specify this manually if you know what
                           you are doing!

Optional Libraries:
  --with-alsa-prefix=DIR   prefix where alsa is installed (optional)
  --disable-alsa           disable ALSA midi sound support [autodetect]

  --with-ogg-prefix=DIR    prefix where libogg is installed (optional)
  --disable-ogg            disable Ogg support [autodetect]

  --with-vorbis-prefix=DIR prefix where libvorbis is installed (optional)
  --disable-vorbis         disable Vorbis support [autodetect]

  --with-tremor-prefix=DIR prefix where tremor is installed (optional)
  --disable-tremor         disable tremor support [autodetect]

  --with-mad-prefix=DIR    prefix where libmad is installed (optional)
  --disable-mad            disable libmad (MP3) support [autodetect]

  --with-flac-prefix=DIR   prefix where libFLAC is installed (optional)
  --disable-flac           disable FLAC support [autodetect]

  --with-zlib-prefix=DIR   prefix where zlib is installed (optional)
  --disable-zlib           disable zlib (compression) support [autodetect]

  --with-mpeg2-prefix=DIR  prefix where libmpeg2 is installed (optional)
  --enable-mpeg2           enable mpeg2 codec for cutscenes [autodetect]

  --with-a52-prefix=DIR    Prefix where liba52 is installed (optional)
  --enable-a52             enable a52 codec for MPEG decoder [autodetect]

  --with-jpeg-prefix=DIR   Prefix where libjpeg is installed (optional)
  --disable-jpeg           disable JPEG decoder [autodetect]

  --with-png-prefix=DIR    prefix where libpng is installed (optional)
  --disable-png            disable PNG decoder [autodetect]

  --with-theoradec-prefix=DIR  prefix where libtheoradec is installed (optional)
  --disable-theoradec      disable Theora decoder [autodetect]

  --with-faad-prefix=DIR   prefix where libfaad is installed (optional)
  --disable-faad           disable AAC decoder [autodetect]

  --with-fluidsynth-prefix=DIR prefix where libfluidsynth is
                           installed (optional)
  --disable-fluidsynth     disable fluidsynth MIDI driver [autodetect]

  --with-ieee1284-prefix=DIR prefix where libieee1284 is installed (optional)
  --enable-opl2lpt         enable OPL2LPT support

  --with-sparkle-prefix=DIR    prefix where sparkle is installed
                           (OS X/Windows only - optional)
  --disable-sparkle        disable sparkle automatic update support
                           [OS X/Windows only - autodetect]

  --disable-osx-dock-plugin    disable the NSDockTilePlugin support
                               [Mac OS X only - autodetect]

  --with-sdl-prefix=DIR    prefix where the sdl-config script is
                           installed (optional)

  --with-freetype2-prefix=DIR  prefix where the freetype-config script is
                               installed (optional)
  --disable-freetype2      disable freetype2 TTF library usage [autodetect]

  --with-nasm-prefix=DIR   prefix where nasm executable is installed (optional)
  --disable-nasm           disable assembly language optimizations [autodetect]

  --with-readline-prefix=DIR   prefix where readline is installed (optional)
  --disable-readline       disable readline support in text console [autodetect]

  --with-libunity-prefix=DIR   prefix where libunity is installed (optional)
  --disable-libunity       disable Unity launcher integration [autodetect]

  --with-sndio-prefix=DIR  prefix where sndio is installed (optional)
  --disable-sndio          disable sndio MIDI driver [autodetect]

  --with-sdlnet-prefix=DIR prefix where SDL_Net is installed (optional)
  --disable-sdlnet         disable SDL_Net networking library [autodetect]

  --with-libcurl-prefix=DIR    prefix where libcurl is installed (optional)
  --disable-libcurl        disable libcurl networking library [autodetect]

Some influential environment variables:
  AR                 archiver command
  AS                 assembler command
  ASFLAGS            assembler flags
  CPPFLAGS           C++ preprocessor flags, e.g. -I<include dir> if you have
                     headers in a nonstandard directory <include dir>
  CXX                C++ compiler command
  CXXFLAGS           C++ compiler flags
  DWP                DWARF packing utility command
  LD                 linker command
  LDFLAGS            linker flags, e.g. -L<lib dir> if you have libraries in a
                     nonstandard directory <lib dir>
  PKG_CONFIG_LIBDIR  list of directories where pkg-config â.pcâ files are
                     looked up
  RANLIB             archive indexer command
  SDL_CONFIG         SDL configurer script name (not path)
  STRIP              symbol stripper command
  WINDRES            Windows resource compiler command
  WINDRESFLAGS       Windows resource compiler flags

EOF
      exit 0
   fi
done # for parm in ...


#
# If we're not showing help, greet the user and start the log file
#
echo "Running ScummVM configure..."
echo "Configure run on" `date` > $TMPLOG
cat >> $TMPLOG <<EOF
Invocation command line was:
$0 $@
Saved environment variables:
AR="$SAVED_AR" AS="$SAVED_AS" ASFLAGS="$SAVED_ASFLAGS" CPPFLAGS="$SAVED_CPPFLAGS" CXX="$SAVED_CXX" CXXFLAGS="$SAVED_CXXFLAGS" DWP="$SAVED_DWP" LD="$SAVED_LD" LDFLAGS="$SAVED_LDFLAGS" PKG_CONFIG_LIBDIR="$SAVED_PKG_CONFIG_LIBDIR" RANLIB="$SAVED_RANLIB" SDL_CONFIG="$SAVED_SDL_CONFIG" STRIP="$SAVED_STRIP" WINDRES="$SAVED_WINDRES" WINDRESFLAGS="$SAVED_WINDRESFLAGS"
EOF

SDL_CONFIG
...
I hope it helps
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: BUG: Window scrollbar makes list browsing behaving wrong

Post by Raziel »

@colinw

Just curious here.

Have you had a chance to test if the second and third behaviour are the same, or are those genuine bugs?
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: BUG: Window scrollbar makes list browsing behaving wrong

Post by broadblues »

Raziel wrote:@colinw

Just curious here.

Have you had a chance to test if the second and third behaviour are the same, or are those genuine bugs?
I don't ColinW is posting in this thread lol :-) (tonyw is though) .

I haven't had a chance to test your specific examples, but as the first isse was explictly workbench related ans the second are quite different components, I'd say they are defintely separate issues. I've seen the odd search whilst left right scrolling issue in the text.datatype over the years, so yes they are genuine bugs in that sense.
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: BUG: Window scrollbar makes list browsing behaving wrong

Post by Raziel »

broadblues wrote:
Raziel wrote:@colinw

Just curious here.

Have you had a chance to test if the second and third behaviour are the same, or are those genuine bugs?
I don't ColinW is posting in this thread lol :-) (tonyw is though) .

I haven't had a chance to test your specific examples, but as the first isse was explictly workbench related ans the second are quite different components, I'd say they are defintely separate issues. I've seen the odd search whilst left right scrolling issue in the text.datatype over the years, so yes they are genuine bugs in that sense.
Thanks for the feedback.

If you have the chance to test them and be sure, i can post a new BUG thread just to distinguish them(?).

colinw???
Where did that come from, must be glasses :-)
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Post Reply