1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00
Commit Graph

3817 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
6dd1498f7c load_jpeg.c Style
This patch is just coding style. Removes some empty lines,...

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
090b761fde load_jpeg.c Removed dead code
This patch removes the code not used. Because the if block
check that buffer[0] is NULL, then, we don't need check it
again inside.

Image is not used yet, so is NULL. We can return NULL.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
49db946aa2 load_jpeg.c Clean code
This patch returns NULL, because the variable image is not used yet.

The patch also removes three lines:

- buffer[0] = NULL;       /* Initialize pointer to avoid spurious free in cleanup code */
  RErrorCode = RERR_BADIMAGEFILE;
  jpeg_destroy_decompress(&cinfo);
  fclose(file);
- if (buffer[0])
-    free(buffer[0]);

buffer is a local variable. The malloc is not used yet. So:

- We set the value to NULL, then check if is null to call free(). So the free()
  call is never used. We can remove the last too lines.
- We don't need set now to NULL, because the variable is empty (the
  initializated (or not) value is not used, and is destroyed as local variable
  when we returns, just one line later.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
a2cc89dd3d load_jpeg.c Removed goto
This patch removes the goto call. I copied the code after the bye: label and
I paste it in the goto-calls.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
de09ac5dad WPrefs.c Removed format-overflow warning
This patch adds some characters to the mbuf buffer, to allow the buffer size and some extra characters.

WPrefs.c: In function ‘loadConfigurations’:
../src/wconfig.h:400:17: warning: ‘%s’ directive writing up to 1023 bytes into a region of size 1018 [-Wformat-overflow=]

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
3dce639aae Appearance.c Removed fallthrough warning
This patch adds some comments to remove the falthrough warning.

Appearance.c: In function ‘renderTexture’:
../WINGs/WINGs/WUtil.h:230:32: warning: this statement may fall through [-Wimplicit-fallthrough=]
 #define wwarning(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_WARNING, fmt, ## args)
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Appearance.c:675:4: note: in expansion of macro ‘wwarning’
    wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
    ^~~~~~~~
Appearance.c:676:3: note: here
   case 'D':
   ^~~~

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
00dffbe317 wmiv.c Removed indentation warning
This patch removes the indentation problem. The patch includes a long comment about the change.

wmiv.c: In function ‘main’:
wmiv.c:843:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    if (e.xclient.data.l[0] == delWindow)
    ^~
wmiv.c:845:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
     break;
     ^~~~~

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
7759d06851 wmgenmenu.c Removed format-truncation
This patch removes the format-truncation warning. The problem is because buf and comm are arrays with the same size (PATH_MAX). In the snprintf, comm is copied to buf, more some extra characters. The patch reduces the size for the array comm in the extra characters. Without the patch, the comm array is truncated. With the patch, the same characters are copied, without the warning.

wmgenmenu.c: In function ‘find_and_write’:
wmgenmenu.c:436:41: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
     snprintf(buf, sizeof(buf), "%s -e %s", terminal ? terminal : "xterm" , comm);
                                         ^
wmgenmenu.c:436:5: note: ‘snprintf’ output 5 or more bytes (assuming 4105) into a destination of size 4104
     snprintf(buf, sizeof(buf), "%s -e %s", terminal ? terminal : "xterm" , comm);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
bf644338e4 gradient.c Removed implicit-fallthrough warnings
This patch adds the comments to remove the warnings.

gradient.c: In function ‘renderGradientWidth’:
gradient.c:162:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
   *ptr++ = b;
   ~~~~~~~^~~
gradient.c:163:2: note: here
  case 2:
  ^~~~
gradient.c:166:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
   *ptr++ = b;
   ~~~~~~~^~~
gradient.c:167:2: note: here
  case 1:
  ^~~~

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
95561fba08 wtextfield.c: Removed multiple warnings
This patch removes the implicit-fallthrough warnings for GCC7. Just add the FALLTHRU comment.
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
a0b223263e wtext.c Remove warnings
This patch removes the FALLTHRU warnings in wtext.c. Only includes the comments for GCC7.

wtext.c: In function ‘handleActionEvents’:
wtext.c:2508:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (event->xbutton.button == Button2) {
      ^
wtext.c:2547:2: note: here
  case ButtonRelease:
  ^~~~
wtext.c: In function ‘handleTextKeyPress’:
wtext.c:2307:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
   *buffer = '\n';
   ~~~~~~~~^~~~~~
wtext.c:2308:2: note: here
  default:
  ^~~~~~~

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
2555413838 wruler.c Remove format-truncation warning
This patch removes the format-truncation error. The warning is because c has size of 3, but using "%d" is not possible to store the value.

wruler.c: In function ‘paintRuler.part.0’:
wruler.c:184:28: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 3 [-Wformat-truncation=]
    snprintf(c, sizeof(c), "%d", ++j);
                            ^~
wruler.c:184:27: note: directive argument in the range [1, 2147483647]
    snprintf(c, sizeof(c), "%d", ++j);
                           ^~~~
wruler.c:184:4: note: ‘snprintf’ output between 2 and 11 bytes into a destination of size 3
    snprintf(c, sizeof(c), "%d", ++j);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The value "j" is the result of "m < w". w is the result of rPtr->view->size.width - rPtr->margins.left;, and both variables are unsigned int. So the value for w is an unsigned int and m is related to i. m cannot be greater of unsigned int.

	i = j = m = 0;
	w = rPtr->view->size.width - rPtr->margins.left;
	while (m < w) {
		XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
			  rPtr->fgGC, rPtr->margins.left + m, 23, rPtr->margins.left + m, marks[i % 8] + 23);
		if (i != 0 && i % 8 == 0) {
			snprintf(c, sizeof(c), "%hu", ++j);
			WMDrawString(rPtr->view->screen, rPtr->drawBuffer, rPtr->fg,
				     rPtr->font, rPtr->margins.left + 2 + m, 26, c, 2);
		}
		m = (++i) * 10;
	}

The printf modifier should be unsigned int.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
3e3f06a7be widgets.c Removes implicit-fallthrough warning
This patch removes this warning:

widgets.c: In function `renderPixmap':
widgets.c:385:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
     if (mask)
        ^
widgets.c:388:4: note: here
    case '.':
    ^~~~

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
1f80c82091 wcolorpanel.c Removed hsbInit warnings
This patch removes these warnings in the hsbInit function.

wcolorpanel.c: In function ‘hsbInit’:
wcolorpanel.c:3456:16: warning: ‘%u’ directive writing between 1 and 5 bytes into a region of size 4 [-Wformat-overflow=]
  sprintf(tmp, "%d", value[0]);
                ^~
wcolorpanel.c:3456:15: note: directive argument in the range [0, 65535]
  sprintf(tmp, "%d", value[0]);
               ^~~~
wcolorpanel.c:3456:2: note: ‘sprintf’ output between 2 and 6 bytes into a destination of size 4
  sprintf(tmp, "%d", value[0]);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

The problem is that the hue variable in the RHSVColor struct. This variable is not an integer, is a shor variable, so using the printf using the "%d" modifier spects an integer. Using a "%hu" prints a unsigned short value.

typedef struct RHSVColor {
    unsigned short hue;	       /* 0-359 */
    unsigned char saturation;      /* 0-255 */
    unsigned char value;	       /* 0-255 */
} RHSVColor;
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
fb5f6c30c0 wcolorpanel.c: Remove warning in rgbIntToChar
This patch removes this warning. The default case should not be used.

wcolorpanel.c: In function ‘rgbIntToChar’:
wcolorpanel.c:2392:2: warning: ‘format’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  sprintf(tmp, format, value[1]);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
972d85610a wcolorpanel.c Avoid compiler warning
This patch removes this warning. The patch adds a switch case that never should happend.

wcolorpanel.c: In function ‘rgbInit’:
wcolorpanel.c:3403:2: warning: ‘format’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  sprintf(tmp, format, panel->color.rgb.green);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Rodolfo García Peñas (kix)
f0f95165e4 WINGs/selection.c Removed compiler warning
This patch removes this warning:

selection.c:265:64: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type]
  wdata = WMCreateDataWithBytesNoCopy((void *) data, len * bpi, (WMFreeDataProc *) XFree);

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2019-06-20 22:04:31 +01:00
Tim Taenny
f895b906a4 Adjusted size of the Legal Information panel
With the changes to the layout, which were introduced in the
previous patch series, and the correction of the default font
size, the Legal Information panel was too small to display the
complete text.
It has been set to a sufficient size.
2019-06-19 18:06:53 +01:00
Tim Taenny
5ab9b7c6be Renamed the ScaleX/Y macros and their local variables
The names of the macros and the local variables that they use
have been changed to make them less "user-space" like.

    ScaleX -> WMScaleX
    ScaleY -> WMScaleY
    fw     -> wmScaleWidth
    fh     -> wmScaleHeight
2019-06-19 18:06:53 +01:00
Tim Taenny
1e490f8233 Adjusted scale factors in ScaleX and ScaleY macros
The scale factors in the macros were based on the assumption that
the default font size was 11. But the actual default font size is
12. This value is specified as DEFAULT_FONT_SIZE in
WINGS/configuration.c.
2019-06-19 18:06:53 +01:00
Tim Taenny
ba3df2599d Use fixed font size in original WMCreate*Panel functions
Instead of just assuming that the size of the system font has not
been changed by the user, the WMCreateAlertPanel,
WMCreateInputPanel and WMCreateGenericPanel functions now use a
fixed default font size of 12, so that changing the system font's
size in WPrefs.app does not break the fixed layouts of these panels.
("12" is specified as DEFAULT_FONT_SIZE in WINGS/configuration.c)
2019-06-19 18:06:53 +01:00
Tim Taenny
c803218ed1 New functions for the creation of scaled panels (WMCreateScaled*Panel)
To prevent breaking applications depending on the static layout
behavior of the WMCreateAlertPanel and WMCreateInputPanel functions
in WINGs, the scaling functionality has been moved to the new
functions WMCreateScaledAlertPanel and WMCreateScaledInputPanel.

The system dialogs (wMessageDialog, wExitDialog, etc.) now use the
new functions, thus keeping the improved layout introduced in the
previous patches.
2019-06-19 18:06:53 +01:00
Carlos R. Mafra
6c6853ea30 util: add wmiv entry to README 2019-06-15 16:49:34 +01:00
Tim Taenny
b48b503eb1 Improved layout of the Info Panel
Instead of relying on static pixel values for position and size of
the widgets, the info panel now scales its widgets based on the
selected system font size.
2019-06-12 23:42:27 +01:00
Tim Taenny
1c8b680e3d Improved layout of the Legal Panel
Instead of relying on static pixel values for position and size of
the widgets, the legal panel now scales its widgets based on the
selected system font size.
2019-06-12 23:42:27 +01:00
Tim Taenny
5eeaf6b890 Improved layout of the Icon Chooser Panel
Instead of relying on static pixel values for position and size of
the widgets, the icon chooser panel now scales its widgets based
on the selected system font size.
2019-06-12 23:42:27 +01:00
Tim Taenny
f9236c8d20 Improved layout of the Input Panels
Instead of relying on static pixel values for position and size of
the widgets, the input panels now scale their widgets based on the
selected system font size.
2019-06-12 23:42:27 +01:00
Tim Taenny
26bb94a8e7 Improved layout of the Alert Panels
Instead of relying on static pixel values for position and size of
the widgets, the alert panels now scale their widgets based on the
selected system font size.
2019-06-12 23:42:27 +01:00
Tim Taenny
b185d46286 Added ScaleX and ScaleY macros to WINGs
To reduce code duplication the ScaleX and ScaleY macros have been
moved to WUtil.h. Along with the function WMGetScaleBaseFromSystemFont
these macros can be used in all panels to scale the widgets based on
the current system font size instead of giving fixed pixel sizes which
messes up the panels if a larger system font is selected in WPrefs.

Use the macros in the following way:

    instead of   WMResizeWidget(widget, 128, 64);
                 WMMoveWidget(widget, 32, 32);

    use          int fw, fh;
                 WMGetScaleBaseFromSystemFont(scr->wmscreen, &fw, &fh);
                 WMResizeWidget(widget, ScaleX(128), ScaleY(64));
                 WMMoveWidget(widget, ScaleX(32), ScaleY(32));
2019-06-12 23:42:27 +01:00
Tim Taenny
8f29bdc690 Improved layout of the widgets in the DockAppSettingsPanel
Instead of relying on static pixel values for position and size of
the widgets, the DockAppSettingsPanel now scales its widgets based
on the selected system font size.
2019-06-12 23:42:27 +01:00
Christophe CURIS
e2cfed3377 Do not stop compilation if library Xmu is not found
We use only 1 function from this library, and it is in a case that should
be rare nowadays: displays with indexed color.
This commit makes it acceptable to compile if the library is missing.
2019-05-04 14:50:48 +01:00
Christophe CURIS
4665972175 Change the way the ChangeLog date is extracted for Texi2txt generated docs
When building into another directory than in the source, the hard-coded
relative path to the changelog will fail finding the file, causing an empty
date in the generated file when '@today' is used.

This patch is making sure the ChangeLog is taken in the source directory to
avoid any problem.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2019-02-22 16:21:00 +00:00
Christophe CURIS
8606ae9a83 WINGs: simplify code
It looks like the original code was expecting the side effect of specifying
a length in the %d to smartly truncate the number, which it does not.
The new code has the same behaviour without extra complexity.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2019-02-22 16:08:36 +00:00
Christophe CURIS
070f0ad8f4 WPrefs: Dead code removal
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2019-02-22 16:08:36 +00:00
Christophe CURIS
2913ac0f09 Do not allocate memory for a temporary buffer
This kind of things participates in memory fragmentation, so it is
generally a bad practice when an on-stack allocation is enough.
Took opportunity to reduce the buffer size, there's no point in
overallocating memory (the new size being still way too much).

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2019-02-22 16:08:36 +00:00
Christophe CURIS
dae63b5e96 WPrefs: Prefer use of 'sizeof' instead of hard-coded values
Hard-coding a value is prone to errors when maintaining the code; using the
builtin C macro 'sizeof' is a much safer choice.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2019-02-22 16:08:36 +00:00
Doug Torrance
738a78b3e2 Replace GNUSTEP_USER_ROOT environment variable with WMAKER_USER_ROOT
As reported in Debian bug #922284 [1]:

    As evident from the prefix, GNUSTEP_USER_ROOT is a GNUstep variable and
    Window Maker should not set it.  Furthemore, it has been deprecated for
    12 years already.  As of gnustep-make/2.7.0-4 the GNUstep build system
    is configured in strict v2 mode which makes it impossible to compile
    GNUstep software.  In a terminal started from a Window Maker session:

    yavor@aneto:/tmp/gorm.app-1.2.24$ make
    This is gnustep-make 2.7.0. Type 'make print-gnustep-make-help' for help.
    Running in gnustep-make version 2 strict mode.
    rm -f InterfaceBuilder; \
    ln -s GormLib InterfaceBuilder
    /usr/share/GNUstep/Makefiles/config-noarch.make:121: *** GNUSTEP_USER_ROOT
    is obsolete.  Stop.

    It is also impossible to build gnustep-make from pristine upstream
    source:

    yavor@aneto:/tmp$ wget -q
      ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-2.7.0.tar.gz
    yavor@aneto:/tmp$ tar xzf gnustep-make-2.7.0.tar.gz
    yavor@aneto:/tmp$ cd gnustep-make-2.7.0/
    yavor@aneto:/tmp/gnustep-make-2.7.0$ ./configure
    ...
    yavor@aneto:/tmp/gnustep-make-2.7.0$ make
    config-noarch.make:121: *** GNUSTEP_USER_ROOT is obsolete.  Stop.

    Note that the majority of GNUstep users use Window Maker as their window
    manager and many of them build GNUstep software from source, mostly
    because of the GNUstep Objective-C runtime which depends on Clang
    (Debian packages use GCC and the GCC/GNU runtime).

Our solution is to replace the GNUSTEP_USER_ROOT environment variable with our
own environment variable, WMAKER_USER_ROOT.  This is documented in NEWS.

[1] https://bugs.debian.org/922284
2019-02-17 18:44:33 +00:00
Stig-Ørjan Smelror
1dace5699f Drop support for Imagemagick version < 7
Had to do a few modifications to get WM to build with Imagemagick 7.

Attached is the diff from the latest git checkout.

Cheers,
Stig
2019-02-12 19:14:01 +00:00
Tim Taenny
5a95631091 Added expert option for WrapAppiconsInDock property to WPrefs
In 2013 Daniel added the functionality to wrap icons, which are
attached to the dock, around the screen edges when the dock is
being moved vertically.
This patch adds an expert option to WPrefs.app for setting the
property which enables/disables this feature.

Remark: In my opinion, the default value for that property should
        be changed to NO, as this is also the default behavior in
        NeXTSTEP. It is handy to be able to move all these icons
        out of sight when working with maximized application
        windows.
2019-02-05 21:32:04 +00:00
Tim Taenny
2427200c3e Added feature: automatic scaling of application icons
If the option "Enforce icon margin" is selected, application window
icons will be selected or scaled so that they only use 75% of the
available icon_size.
Even if the feature is not enabled, this change will scale down
large application icons to icon_size, so that icons can be used
that were rejected by the previous implementation of findBestIcon.
(Example: The Qt Creator icon never showed before, because it is
only provided in 128x128 resolution. Now it's visible.)
2019-01-31 17:22:49 +00:00
Tim Taenny
d6c1ac3ecf Added icon feature option to WPrefs: Enforce icon margin
The current findBestIcon function usually selects an icon image
that almost completely fills up the (default) 64x64 pixels of an
icon. As Dan noted in the function, the icon images should use only
75% of the available space, which would result in room for the
miniwindow title and better overall aesthetics.

This feature option provides for enabling such an automatic "icon
shrinking" functionality.

Note: This commit only introduces the new option, not the actual
      image shrinking.
2019-01-31 17:22:49 +00:00
Tim Taenny
9b5eaa3d3e Use popup button for animation style instead of option group in WPrefs
To make some room for an additional icon option (yet to be committed)
the options group for selecting the iconification animation is
replaced by a popup button. This allows for adding at least two more
checkboxes in the options and makes adding new animation styles less
painful.
2019-01-31 17:22:49 +00:00
Tim Taenny
2beb5f2c52 Fixed icon loading during Attribute Inspector startup
When opening the "Icon and Initial Workspace" panel of the Attribute
Inspector, the Miniwindow Image and the corresponding text field were
always empty, even if an icon had been selected, applied and saved
before. The file name was not loaded from the database on startup
of the inspector window.

With this change, the icon and the text field are properly set on
startup of the inspector window.
2019-01-30 23:43:23 +00:00
Carlos R. Mafra
f1809a7786 wmgenmenu: add a few programs 2019-01-22 22:25:06 +00:00
Gaspar Chilingarov
8b919b0d33 support moving window between heads using keyboard
Window Maker allows to perform practically all operations with windows
using only keyboard. One of the actions so far which required using
mouse was dragging window from one head (monitor) to another.

This patch introduces support for keyboard shortcuts. These shortcuts
move windows in circular fashion (if you have 3 and more monitors).

In case of 2 or 3 monitors arranged horizontally - window will just move
right/left.

In case of 3x3 setup - it is impossible to move window to central
monitor with keyboard.

- preserves window position and size (if display sizes are same)
- otherwise tries to fit window to smaller display
2018-12-16 10:13:50 +00:00
Doug Torrance
d13b78bdde configure: Fix pkg-config variable typo.
The variable set by PKG_PROG_PKG_CONFIG which points to the pkg-config
utility is PKG_CONFIG, not PKGCONFIG.  The latter was previously used
when trying to detect the presence of the MagickWand library when Window
Maker was built using --enable-magick.
2018-08-08 08:51:45 +01:00
Gaspar Chilingarov
6668715402 Detect and override illegal window size hints
The problem - when VirtualBox starts virtual machine, window has very
small height (couple of pixels) and it requires some manual fiddling
to resize it to something usable.

See related bugs here:

https://www.virtualbox.org/ticket/14718#comment:19 - small horizontal
line in the middle of the screen is newly opened virtual machine's
window.

https://www.virtualbox.org/ticket/15863

Inspecting with xdebug and xprop reveals that VirtualBox sends wrong hints:

Request(12): ConfigureWindow window=0x0660000a values={x=27 y=559
width=720 height=65512}

Which is interpreted by X server wrongly and shown with xprop as

WM_NORMAL_HINTS(WM_SIZE_HINTS)
:
                user specified location: 27, 559
                user specified size: 720 by -24
                program specified minimum size: 254 by 109
                window gravity: Static

Some part of X11 interprets such large value as signed int and wraps
it to negative value.

The solution will be if program requests such big window - detect it,
ignore requested size and resize it to some reasonable defaults.

Disclaimer - I tested it only on Ubuntu 16.04, but should apply to
another systems as well - see bug reports.
2018-05-21 13:02:22 +01:00
Doug Torrance
100745d356 setstyle: Add support for fpixmap ("fillscale") textures 2018-05-15 19:55:28 +01:00
Doug Torrance
7c89ca2551 menu: Fix broken "Save Theme" option.
This option had been broken for several reasons:
* The getstyle utility does not replace the #usergnusteppath# macro which
  was passed to it by the menu.
* When processing the USER_THEMES_DIR macro, the menu inserts a space
  afterwards, and so the directory and filename were passed to getstyle
  as two separate arguments.
* It used the old, pre-0.50.0 theme format.

By using the -p option to getstyle, we can avoid these issues, as we don't
need to specify the directory *and* it uses the 'new' (since 1999) themepack
format.
2018-05-15 19:43:25 +01:00
Doug Torrance
0c737bc834 Add new Adwaita style to Makefile. 2018-05-15 14:26:51 +01:00