Bug 1677641

Summary: Plastik theme shows defunct close button on non deletable gtk window
Product: Red Hat Enterprise Linux 7 Reporter: Piyush Bhoot <pbhoot>
Component: kde-workspaceAssignee: Jan Grulich <jgrulich>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: ayadav, cww, desktop-qa-list, jeischma, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kde-workspace-4.11.19-15.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 19:12:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1727111    
Attachments:
Description Flags
Screenshot of reproducing the bug after component's update
none
Screenshot from reproducing the bug in TEST SETUP 2 none

Description Piyush Bhoot 2019-02-15 13:01:38 UTC
Description of problem:

An application which uses GTK3 and creates a window without close button / close capability will show a close button that cannot be interacted with.


Version-Release number of selected component (if applicable):
kde-workspace-4.11.19-12.el7.x86_64

How reproducible:

Always


Steps to Reproduce:

Apply Plastik window decoration

#include <gtk/gtk.h>

// gcc -g window.cpp  `pkg-config --cflags --libs gtk+-3.0`  -o WindowExample && ./WindowExample

static void
print_hello (GtkWidget *widget,
             gpointer   data)
{
  g_print ("Hello World\n");
}

int
main (int argc, char **argv)
{
  gtk_init(&argc, &argv);

  GtkWidget *window;
 
  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Window");
  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
  gtk_window_set_deletable(GTK_WINDOW(window), FALSE);

  gtk_widget_show_all (window);

  gtk_main();

  return 0;
}

Actual results:

Shows close button that does not work

Expected results:

Should not show close button like other themes.

Additional info:

Comment 3 Jan Grulich 2019-08-05 13:24:46 UTC
Fixed with kde-workspace-4.11.19-14.el7.

Comment 5 Pavlin Georgiev 2019-08-26 09:29:12 UTC
Created attachment 1608060 [details]
Screenshot of reproducing the bug after component's update

TEST SETUP
Distro: RHEL 7.7 Workstation
Component version: kde-workspace-4.11.19-13.el7


TEST PROCEDURE
1. Install "KDE Plasma Workspaces".
2. Log in a KDE session.
3. Set application appearance to theme "Plastique".
4. Compile the code for reproducing the bug.
5. Reproduce the bug.
The bug appears.


TEST PROCEDURE 2
1. Download and install Brew build kde-workspace-4.11.19-14.el7.
    https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=943971
2. Compile the code for reproducing the bug.
3. Reproduce the bug.
The bug appears.


RESULT
There is no close button on the GUI frame/dialog.

Comment 6 Pavlin Georgiev 2019-08-26 14:01:28 UTC
Created attachment 1608134 [details]
Screenshot from reproducing the bug in TEST SETUP 2

TEST SETUP 2
Distro: RHEL 7.6 Workstation
Component version: kde-workspace-4.11.19-12.el7


TEST PROCEDURE 2.1
1. Download and install Brew build kde-workspace-4.11.19-14.el7.
2. Reboot the system.
3. Log in a KDE session.
4. Compile the code for reproducing the bug.
5. Reproduce the bug.


RESULT 2
There is no close button on the GUI frame/dialog.

Comment 7 Pavlin Georgiev 2019-08-26 14:01:48 UTC
OUTCOME
The bug is not fixed yet.

Comment 8 Jan Grulich 2019-08-26 14:06:02 UTC
Pavlin, the bug is about not showing the close button, it's correct that it is missing.

Comment 9 Jan Grulich 2019-08-26 14:06:56 UTC
Also, it shouldn't be tested with Oxygen theme, where this behavior was correct, but with Plastik.

Comment 10 Pavlin Georgiev 2019-08-26 15:07:13 UTC
Expected result:

Should not show close button like other themes.

Then the bug is fixed.

Comment 11 Jan Grulich 2019-12-05 12:50:03 UTC
(In reply to Pavlin Georgiev from comment #10)
> Expected result:
> 
> Should not show close button like other themes.
> 
> Then the bug is fixed.

Pavlin, see bug#1779401. You probably did not test the Plastik theme and it should fail your test.

Comment 13 Tomas Pelka 2019-12-06 15:00:32 UTC
Not sure what I'm doing wrong but the reproducer still shows no close button and also Close option in context menu.

kde-workspace-4.11.19-15.el7

Comment 14 Jan Grulich 2019-12-07 07:24:07 UTC
(In reply to Tomas Pelka from comment #13)
> Not sure what I'm doing wrong but the reproducer still shows no close button
> and also Close option in context menu.
> 
> kde-workspace-4.11.19-15.el7

That's correct. The change is about not showing the "close" button when it's disabled. Before my change when you tried the example, you could see the "close" button, but it wasn't working. Now the button should be gone.

Comment 15 Tomas Pelka 2019-12-07 07:37:21 UTC
(In reply to Jan Grulich from comment #14)
> (In reply to Tomas Pelka from comment #13)
> > Not sure what I'm doing wrong but the reproducer still shows no close button
> > and also Close option in context menu.
> > 
> > kde-workspace-4.11.19-15.el7
> 
> That's correct. The change is about not showing the "close" button when it's
> disabled. Before my change when you tried the example, you could see the
> "close" button, but it wasn't working. Now the button should be gone.

Actually from my perspective it behaved all the same no matter what pkg (old vs new) I have installed.

Comment 16 Jan Grulich 2019-12-07 08:05:09 UTC
It works for me. When I set the Plastik theme and compile the example, then running it I no longer see the close button.

Comment 19 errata-xmlrpc 2020-03-31 19:12:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1015