[plasmashell] [Bug 474502] Multi monitor window position clipping error

2023-09-14 Thread John W Cornell
https://bugs.kde.org/show_bug.cgi?id=474502

John W Cornell  changed:

   What|Removed |Added

 CC||john.wayne.corn...@gmail.co
   ||m

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 474502] New: Multi monitor window position clipping error

2023-09-13 Thread John W Cornell
https://bugs.kde.org/show_bug.cgi?id=474502

Bug ID: 474502
   Summary: Multi monitor window position clipping error
Classification: Plasma
   Product: plasmashell
   Version: 5.27.4
  Platform: Ubuntu
OS: Linux
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: Desktop Containment
  Assignee: plasma-b...@kde.org
  Reporter: john.wayne.corn...@gmail.com
CC: notm...@gmail.com
  Target Milestone: 1.0

SUMMARY
***
When programatically setting window size and position of a window on a monitor
that does not show a Panel the area is clipped as though a Panel were present
and if the main panel is on the bottom of the primary monitor the window is
moved upwards so that the title bar is off screen. 
***


STEPS TO REPRODUCE
1.  Save the following code to myapp.c

#include 
#include 
#include 

static void on_button_clicked(GtkWidget *button, gpointer user_data) {
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), "Test Window");
gtk_window_set_default_size(GTK_WINDOW(window), 400, 300);

gtk_widget_show_all(window);

// Maximize the window
gtk_window_maximize(GTK_WINDOW(window));

// Allow the window to actually maximize before retrieving its size and
position
while (gtk_events_pending())
gtk_main_iteration();

 // Using X11 to retrieve the geometry
GdkWindow *gdkwindow = gtk_widget_get_window(window);
Window xwindow = GDK_WINDOW_XID(gdkwindow);

Display *display = XOpenDisplay(NULL);
if (!display) {
g_printerr("Failed to open X display\n");
return;
}

sleep(1);

int x, y;
Window child;
unsigned int width, height, border_width, depth;
Window root_return;

XGetGeometry(display, xwindow, _return, , , , ,
_width, );

XTranslateCoordinates(display, xwindow,
XRootWindowOfScreen(XDefaultScreenOfDisplay(display)),
  x, y, , , );
g_print("Window geometry: x=%d, y=%d, width=%u, height=%u\n", x, y, width,
height);

gtk_window_unmaximize(GTK_WINDOW(window));
while (gtk_events_pending())
gtk_main_iteration();

// Set the size and position

XMoveResizeWindow(display, xwindow, x, y, width, height);
XSync(display, FALSE);

while (gtk_events_pending())
gtk_main_iteration();

XGetGeometry(display, xwindow, _return, , , , ,
_width, );

XTranslateCoordinates(display, xwindow,
XRootWindowOfScreen(XDefaultScreenOfDisplay(display)),
  x, y, , , );
g_print("Window geometry: x=%d, y=%d, width=%u, height=%u\n", x, y, width,
height);

XCloseDisplay(display);
}

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

GtkWidget *main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(main_window), "Main Window");
gtk_window_set_default_size(GTK_WINDOW(main_window), 200, 100);
g_signal_connect(main_window, "destroy", G_CALLBACK(gtk_main_quit), NULL);

GtkWidget *button = gtk_button_new_with_label("Create Window");
g_signal_connect(button, "clicked", G_CALLBACK(on_button_clicked), NULL);
gtk_container_add(GTK_CONTAINER(main_window), button);

gtk_widget_show_all(main_window);
gtk_main();

return 0;
}


2. Compile
gcc `pkg-config --cflags gtk+-3.0` -o myapp myapp.c `pkg-config --libs
gtk+-3.0` -lX11

3.  execute
./myapp

4 Move the window to a monitor on which the panel is parallel top or bottom in
desktop coordinates.
5 Press the button

OBSERVED RESULT
the window size and position taken from the maximized position for the second
monitor are cropped where the Panel would be displayed. Pushing up if the Panel
would be at the bottom or cropping and moving down if the Panel would be at the
top.

EXPECTED RESULT
A Window positioned and sized to the maximized position and size. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Operating System: Ubuntu Studio 23.04
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.0-1012-lowlatency (64-bit)
Graphics Platform: X11
Processors: 8 × AMD FX(tm)-8300 Eight-Core Processor
Memory: 31.2 GiB of RAM
Graphics Processor: NVIDIA RTX A5000/PCIe/SSE2

ADDITIONAL INFORMATION
This error prevents utility functions from being able to properly position
windows across runs on a secondary display. It definitely isn't an X11 problem
or windows could not be maximized correctly. In short when the Panel is
parallel in desktop coordinates the window rect is clipped as though the panel
is displayed on every monitor

-- 
You are receiving this mail because:
You are watching all bug changes.

[Discover] [Bug 391725] New: Discover scroll crash

2018-03-11 Thread John W Cornell
https://bugs.kde.org/show_bug.cgi?id=391725

Bug ID: 391725
   Summary: Discover scroll crash
   Product: Discover
   Version: 5.10.5
  Platform: Ubuntu Packages
OS: Linux
Status: UNCONFIRMED
  Keywords: drkonqi
  Severity: normal
  Priority: NOR
 Component: discover
  Assignee: aleix...@kde.org
  Reporter: john.wayne.corn...@gmail.com
  Target Milestone: ---

Application: plasma-discover (5.10.5)

Qt Version: 5.9.1
Frameworks Version: 5.38.0
Operating System: Linux 4.13.0-36-lowlatency x86_64
Distribution: Ubuntu 17.10

-- Information about the crash:
- What I was doing when the application crashed:

I was attempting to use the left panel scrollbar of Discovers Plasma Add On
section.
It never shows usable scrollbars.

- Unusual behavior I noticed:
No scroll bar and buggy behavior when I attempted to summon one by placing the
mouse over ther rightmost area of the pannel.

-- Backtrace:
Application: Discover (plasma-discover), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f29243275c0 (LWP 20400))]

Thread 18 (Thread 0x7f28ae91b700 (LWP 20426)):
#0  0x7f291c2e0072 in futex_wait_cancelable (private=,
expected=0, futex_word=0x562a93e8182c) at
../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x7f291c2e0072 in __pthread_cond_wait_common (abstime=0x0,
mutex=0x562a93e817d8, cond=0x562a93e81800) at pthread_cond_wait.c:502
#2  0x7f291c2e0072 in __pthread_cond_wait (cond=0x562a93e81800,
mutex=0x562a93e817d8) at pthread_cond_wait.c:655
#3  0x7f28febc5b8b in  () at /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x in  ()

Thread 17 (Thread 0x7f28ae11a700 (LWP 20424)):
#0  0x7f291a45f5d4 in g_mutex_unlock () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x7f291a419949 in g_main_context_query () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x7f291a41a0e7 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x7f291a41a27c in g_main_context_iteration () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x7f29203a449b in
QEventDispatcherGlib::processEvents(QFlags) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x7f2920349e3a in
QEventLoop::exec(QFlags) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x7f29201693ca in QThread::exec() () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x7f292016e29d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x7f291c2d97fc in start_thread (arg=0x7f28ae11a700) at
pthread_create.c:465
#9  0x7f291fa70b5f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 16 (Thread 0x7f28bf155700 (LWP 20419)):
#0  0x7f291a419880 in g_main_context_query () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x7f291a41a0e7 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x7f291a41a27c in g_main_context_iteration () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x7f29203a449b in
QEventDispatcherGlib::processEvents(QFlags) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x7f2920349e3a in
QEventLoop::exec(QFlags) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x7f29201693ca in QThread::exec() () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x7f292016e29d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x7f291c2d97fc in start_thread (arg=0x7f28bf155700) at
pthread_create.c:465
#8  0x7f291fa70b5f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 15 (Thread 0x7f28b700 (LWP 20418)):
#0  0x7f291c2e18e3 in __GI___pthread_getspecific (key=3) at
pthread_getspecific.c:30
#1  0x7f291a441b30 in g_thread_self () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x7f291a41a26d in g_main_context_iteration () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x7f29203a449b in
QEventDispatcherGlib::processEvents(QFlags) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x7f2920349e3a in
QEventLoop::exec(QFlags) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x7f29201693ca in QThread::exec() () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x7f292016e29d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x7f291c2d97fc in start_thread (arg=0x7f28b700) at
pthread_create.c:465
#8  0x7f291fa70b5f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 14 (Thread 0x7f28c6e7e700 (LWP 20415)):
#0  0x7f291a45f5b9 in g_mutex_lock () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x7f291a41999e in g_main_context_check () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x7f291a41a110 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x7f291a41a502 in g_main_loop_run () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x7f28c55b5b26 in  () at /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#5  0x7f291a441645 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x7f291c2d97fc