May 21, 2013 Re: Compile X Window Manager | ||||
---|---|---|---|---|
| ||||
Posted in reply to eles | On Tuesday, 21 May 2013 at 12:46:35 UTC, eles wrote:
> On Tuesday, 21 May 2013 at 12:36:27 UTC, Samms wrote:
>> On Tuesday, 21 May 2013 at 08:35:09 UTC, eles wrote:
>>> On Tuesday, 21 May 2013 at 06:59:55 UTC, Iain Buclaw wrote:
>>>> On 21 May 2013 04:58, Samms <matesax@gmail.com> wrote:
>>>
>> This problem is resolved...
>
> I know. I was offering a simpler solution (command line), that's all.
OK - thank you very much! :)
|
May 21, 2013 Re: Compile X Window Manager | ||||
---|---|---|---|---|
| ||||
Posted in reply to eles | On Tuesday, 21 May 2013 at 12:46:35 UTC, eles wrote: > On Tuesday, 21 May 2013 at 12:36:27 UTC, Samms wrote: >> On Tuesday, 21 May 2013 at 08:35:09 UTC, eles wrote: >>> On Tuesday, 21 May 2013 at 06:59:55 UTC, Iain Buclaw wrote: >>>> On 21 May 2013 04:58, Samms <matesax@gmail.com> wrote: >>> >> This problem is resolved... > > I know. I was offering a simpler solution (command line), that's all. But your code is wrong... gdc ./main.d /usr/include/d2/4.6/std/c/linux/X11/Xlib.d -o Refuja -lXlib -lX11 /usr/bin/ld: cannot find -lXlib collect2: ld returned 1 exit status |
May 21, 2013 Re: Compile X Window Manager | ||||
---|---|---|---|---|
| ||||
Posted in reply to Samms | On 05/21/2013 03:06 PM, Samms wrote: > On Tuesday, 21 May 2013 at 12:46:35 UTC, eles wrote: >> On Tuesday, 21 May 2013 at 12:36:27 UTC, Samms wrote: >>> On Tuesday, 21 May 2013 at 08:35:09 UTC, eles wrote: >>>> On Tuesday, 21 May 2013 at 06:59:55 UTC, Iain Buclaw wrote: >>>>> On 21 May 2013 04:58, Samms <matesax@gmail.com> wrote: >>>> >>> This problem is resolved... >> >> I know. I was offering a simpler solution (command line), that's all. > > But your code is wrong... > > gdc ./main.d /usr/include/d2/4.6/std/c/linux/X11/Xlib.d -o Refuja > -lXlib -lX11 > /usr/bin/ld: cannot find -lXlib > collect2: ld returned 1 exit status Thats because there is no libXlib only libX11. gdc ./main.d /usr/include/d2/4.6/std/c/linux/X11/Xlib.d -o Refuja -lX11 Should work without any errors. -- Mike Wey |
May 21, 2013 Re: Compile X Window Manager | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey | On Tuesday, 21 May 2013 at 17:20:37 UTC, Mike Wey wrote:
> On 05/21/2013 03:06 PM, Samms wrote:
>> On Tuesday, 21 May 2013 at 12:46:35 UTC, eles wrote:
>>> On Tuesday, 21 May 2013 at 12:36:27 UTC, Samms wrote:
>>>> On Tuesday, 21 May 2013 at 08:35:09 UTC, eles wrote:
>>>>> On Tuesday, 21 May 2013 at 06:59:55 UTC, Iain Buclaw wrote:
> Thats because there is no libXlib only libX11.
good catch
|
May 21, 2013 Re: Compile X Window Manager | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey | On Tuesday, 21 May 2013 at 17:20:37 UTC, Mike Wey wrote:
> On 05/21/2013 03:06 PM, Samms wrote:
>> On Tuesday, 21 May 2013 at 12:46:35 UTC, eles wrote:
>>> On Tuesday, 21 May 2013 at 12:36:27 UTC, Samms wrote:
>>>> On Tuesday, 21 May 2013 at 08:35:09 UTC, eles wrote:
>>>>> On Tuesday, 21 May 2013 at 06:59:55 UTC, Iain Buclaw wrote:
>>>>>> On 21 May 2013 04:58, Samms <matesax@gmail.com> wrote:
>>>>>
>>>> This problem is resolved...
>>>
>>> I know. I was offering a simpler solution (command line), that's all.
>>
>> But your code is wrong...
>>
>> gdc ./main.d /usr/include/d2/4.6/std/c/linux/X11/Xlib.d -o Refuja
>> -lXlib -lX11
>> /usr/bin/ld: cannot find -lXlib
>> collect2: ld returned 1 exit status
>
> Thats because there is no libXlib only libX11.
>
> gdc ./main.d /usr/include/d2/4.6/std/c/linux/X11/Xlib.d -o Refuja -lX11
>
> Should work without any errors.
You were right.
|
May 22, 2013 Re: Compile X Window Manager | ||||
---|---|---|---|---|
| ||||
Posted in reply to Samms | Oh - no! :) Compilation is OK - but Manager not work. It is only overwrite od TinyWM: import std.c.linux.X11.Xlib; import std.c.linux.X11.X; /* gdc ./main.d /usr/include/d2/4.6/std/c/linux/X11/Xlib.d -o refuja -lX11 */ int main() { Display *dpy; XWindowAttributes attr; XButtonEvent start; XEvent ev; dpy = XOpenDisplay(cast(char*)0); if(!dpy) return 1; XGrabKey(dpy, XKeysymToKeycode(dpy, XStringToKeysym(cast(char*)"F1")), KeyMask.Mod1Mask, DefaultRootWindow(dpy), cast(Bool)true, GrabMode.GrabModeAsync, GrabMode.GrabModeAsync); XGrabButton(dpy, 1, KeyMask.Mod1Mask, DefaultRootWindow(dpy), cast(Bool)true, EventMask.ButtonPressMask|EventMask.ButtonReleaseMask|EventMask.PointerMotionMask, GrabMode.GrabModeAsync, GrabMode.GrabModeAsync, None, None); XGrabButton(dpy, 3, KeyMask.Mod1Mask, DefaultRootWindow(dpy), cast(Bool)true, EventMask.ButtonPressMask|EventMask.ButtonReleaseMask|EventMask.PointerMotionMask, GrabMode.GrabModeAsync, GrabMode.GrabModeAsync, None, None); start.subwindow = None; while(true) { XNextEvent(dpy, &ev); if(ev.type == EventType.KeyPress && ev.xkey.subwindow != None) XRaiseWindow(dpy, ev.xkey.subwindow); else if(ev.type == EventType.ButtonPress && ev.xbutton.subwindow != None) { XGetWindowAttributes(dpy, ev.xbutton.subwindow, &attr); start = ev.xbutton; } else if(ev.type == EventType.MotionNotify && start.subwindow != None) { int xdiff = ev.xbutton.x_root - start.x_root, ydiff = ev.xbutton.y_root - start.y_root; XMoveResizeWindow(dpy, start.subwindow, attr.x + (start.button==1 ? xdiff : 0), attr.y + (start.button==1 ? ydiff : 0), Max(1, attr.width + (start.button==3 ? xdiff : 0)), Max(1, attr.height + (start.button==3 ? ydiff : 0))); } else if(ev.type == EventType.ButtonRelease) start.subwindow = None; } } int Max(int a, int b) { return (a > b ? a : b); } What is the problem? Thank you. |
May 23, 2013 Re: Compile X Window Manager | ||||
---|---|---|---|---|
| ||||
Posted in reply to Samms | On Wednesday, 22 May 2013 at 19:07:17 UTC, Samms wrote:
> Oh - no! :) Compilation is OK - but Manager not work. It is only overwrite od TinyWM:
> ...
> What is the problem?
> Thank you.
there is a little chance anyone from community used this "manager", but maybe someone skilled with x11 would help if you describe what exactly doesn't work.
|
Copyright © 1999-2021 by the D Language Foundation